Skip to content

Commit 14d7997

Browse files
committed
Clear unused variable in fltimpl.h in cross-compiler way
1 parent c654762 commit 14d7997

File tree

2 files changed

+4
-22
lines changed

2 files changed

+4
-22
lines changed

basecode.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ size_t Grouper::Put2(const byte *begin, size_t length, int messageEnd, bool bloc
225225
}
226226

227227
size_t len;
228-
FILTER_OUTPUT2(2, len = STDMIN(length-m_inputPosition, m_groupSize-m_counter),
228+
FILTER_OUTPUT2(2, (len = STDMIN(length-m_inputPosition, m_groupSize-m_counter)),
229229
begin+m_inputPosition, len, 0);
230230
m_inputPosition += len;
231231
m_counter += len;

fltrimpl.h

+3-21
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
#ifndef CRYPTOPP_FLTRIMPL_H
22
#define CRYPTOPP_FLTRIMPL_H
33

4-
#if CRYPTOPP_MSC_VERSION
5-
# pragma warning(push)
6-
# pragma warning(disable: 4100)
7-
#endif
8-
9-
#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
10-
# pragma GCC diagnostic push
11-
# pragma GCC diagnostic ignored "-Wunused-value"
12-
#endif
13-
144
#define FILTER_BEGIN \
155
switch (m_continueAt) \
166
{ \
@@ -38,7 +28,7 @@
3828
#define FILTER_OUTPUT3(site, statement, output, length, messageEnd, channel) \
3929
{\
4030
case site: \
41-
statement; \
31+
(void) statement; \
4232
if (Output(site, output, length, messageEnd, blocking, channel)) \
4333
return STDMAX(size_t(1), length-m_inputPosition);\
4434
}
@@ -56,7 +46,7 @@
5646
{\
5747
/* fall through */ \
5848
case site: \
59-
statement; \
49+
(void) statement; \
6050
if (OutputModifiable(site, output, length, messageEnd, blocking)) \
6151
return STDMAX(size_t(1), length-m_inputPosition);\
6252
}
@@ -68,20 +58,12 @@
6858
{\
6959
/* fall through */ \
7060
case site: \
71-
statement; \
61+
(void) statement; \
7262
if (modifiable ? OutputModifiable(site, output, length, messageEnd, blocking) : Output(site, output, length, messageEnd, blocking)) \
7363
return STDMAX(size_t(1), length-m_inputPosition);\
7464
}
7565

7666
#define FILTER_OUTPUT_MAYBE_MODIFIABLE(site, output, length, messageEnd, modifiable) \
7767
FILTER_OUTPUT2_MAYBE_MODIFIABLE(site, 0, output, length, messageEnd, modifiable)
7868

79-
#if CRYPTOPP_MSC_VERSION
80-
# pragma warning(pop)
81-
#endif
82-
83-
#if CRYPTOPP_GCC_DIAGNOSTIC_AVAILABLE
84-
# pragma GCC diagnostic pop
85-
#endif
86-
8769
#endif

0 commit comments

Comments
 (0)