Skip to content

Commit 70b47e2

Browse files
committed
Fix R CMD diagnostic complaints
1 parent c3b7713 commit 70b47e2

File tree

3 files changed

+1
-24
lines changed

3 files changed

+1
-24
lines changed

src/mbedtls/library/constant_time_impl.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
#if defined(MBEDTLS_BIGNUM_C)
1212
#include "mbedtls/bignum.h"
1313
#endif
14-
#if defined(MBEDTLS_COMPILER_IS_GCC) && (__GNUC__ > 4)
15-
#pragma GCC diagnostic push
16-
#pragma GCC diagnostic ignored "-Wredundant-decls"
17-
#endif
1814
#if defined(MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN) || \
1915
(defined(MBEDTLS_TEST_CONSTANT_FLOW_VALGRIND) && !defined(MBEDTLS_TEST_CONSTANT_FLOW_ASM))
2016
#define MBEDTLS_CT_NO_ASM
@@ -112,16 +108,9 @@ static inline mbedtls_ct_condition_t mbedtls_ct_bool(mbedtls_ct_uint_t x)
112108
return (mbedtls_ct_condition_t) x;
113109
#else
114110
const mbedtls_ct_uint_t xo = mbedtls_ct_compiler_opaque(x);
115-
#if defined(_MSC_VER)
116-
#pragma warning( push )
117-
#pragma warning( disable : 4146 )
118-
#endif
119111
mbedtls_ct_int_t y = (-xo) | -(xo >> 1);
120112
y = (((mbedtls_ct_uint_t) y) >> (MBEDTLS_CT_SIZE - 1));
121113
return (mbedtls_ct_condition_t) (-y);
122-
#if defined(_MSC_VER)
123-
#pragma warning( pop )
124-
#endif
125114
#endif
126115
}
127116
static inline mbedtls_ct_uint_t mbedtls_ct_if(mbedtls_ct_condition_t condition,
@@ -390,7 +379,4 @@ static inline mbedtls_ct_condition_t mbedtls_ct_bool_not(mbedtls_ct_condition_t
390379
{
391380
return (mbedtls_ct_condition_t) (~x);
392381
}
393-
#if defined(MBEDTLS_COMPILER_IS_GCC) && (__GNUC__ > 4)
394-
#pragma GCC diagnostic pop
395-
#endif
396382
#endif

src/mbedtls/library/platform_util.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,11 @@ void mbedtls_platform_zeroize(void *buf, size_t len)
7272
#if defined(__GNUC__)
7373
#if defined(__clang__) || (__GNUC__ >= 10)
7474
#if defined(__clang__)
75-
#pragma clang diagnostic push
76-
#pragma clang diagnostic ignored "-Wvla"
7775
#elif defined(MBEDTLS_COMPILER_IS_GCC)
78-
#pragma GCC diagnostic push
79-
#pragma GCC diagnostic ignored "-Wvla"
8076
#endif
8177
asm volatile ("" : : "m" (*(char (*)[len]) buf) :);
8278
#if defined(__clang__)
83-
#pragma clang diagnostic pop
8479
#elif defined(MBEDTLS_COMPILER_IS_GCC)
85-
#pragma GCC diagnostic pop
8680
#endif
8781
#endif
8882
#endif

src/nng/src/platform/posix/posix_pipe.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,13 @@ nni_plat_pipe_open(int *wfd, int *rfd)
9898
return (0);
9999
}
100100

101-
#pragma GCC diagnostic push
102-
#pragma GCC diagnostic ignored "-Wunused-result"
103101
void
104102
nni_plat_pipe_raise(int wfd)
105103
{
106104
char c = 1;
107105

108-
(void) write(wfd, &c, 1);
106+
if (write(wfd, &c, 1)) {};
109107
}
110-
#pragma GCC diagnostic pop
111108

112109
void
113110
nni_plat_pipe_clear(int rfd)

0 commit comments

Comments
 (0)