From: Arran Cudbard-Bell Date: Mon, 25 Jan 2021 22:47:42 +0000 (+0000) Subject: Fix various build issues X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b45ed367c7fbcbd4aa4d772adcce2daecf3b75d;p=thirdparty%2Ffreeradius-server.git Fix various build issues --- diff --git a/src/include/build.h b/src/include/build.h index cc8debcfce..b45f749f47 100644 --- a/src/include/build.h +++ b/src/include/build.h @@ -190,7 +190,7 @@ extern "C" { DIAG_OFF(_x) \ DIAG_ON(pragmas) # define DIAG_ON_OPTIONAL(_x) \ - DIAG_OFF(pragmas) + DIAG_OFF(pragmas) \ DIAG_ON(_x) \ DIAG_ON(pragmas) # define DIAG_PUSH() DIAG_PRAGMA(push) diff --git a/src/lib/util/socket.c b/src/lib/util/socket.c index 749c4f6dda..1f382177c5 100644 --- a/src/lib/util/socket.c +++ b/src/lib/util/socket.c @@ -841,7 +841,7 @@ int fr_socket_bind(int sockfd, fr_ipaddr_t const *src_ipaddr, uint16_t *src_port * is likely to be the function which returns * the "original" error. */ - (void)fr_strerror(); + fr_strerror_clear(); if (src_port) my_port = *src_port; if (src_ipaddr) { diff --git a/src/lib/util/strerror.c b/src/lib/util/strerror.c index 9746ee92fb..880759fe0e 100644 --- a/src/lib/util/strerror.c +++ b/src/lib/util/strerror.c @@ -380,7 +380,7 @@ void fr_strerror_marker_printf_push_head(char const *subject, size_t offset, cha * * @hidecallergraph */ -static inline CC_HINT(always_inline) CC_HINT(nonnull) fr_log_entry_t *strerror_const(char const *msg) +static inline CC_HINT(always_inline) fr_log_entry_t *strerror_const(char const *msg) { fr_log_entry_t *entry; fr_log_buffer_t *buffer; @@ -430,8 +430,7 @@ void fr_strerror_const(char const *msg) * * @hidecallergraph */ -static CC_HINT(always_inline) CC_HINT(nonnull) -fr_log_entry_t *strerror_const_push(fr_log_buffer_t *buffer, char const *msg) +static CC_HINT(always_inline) fr_log_entry_t *strerror_const_push(fr_log_buffer_t *buffer, char const *msg) { fr_log_entry_t *entry; diff --git a/src/modules/rlm_pap/rlm_pap.c b/src/modules/rlm_pap/rlm_pap.c index 5f30479056..ccaafa1dd8 100644 --- a/src/modules/rlm_pap/rlm_pap.c +++ b/src/modules/rlm_pap/rlm_pap.c @@ -534,7 +534,7 @@ static inline CC_HINT(nonnull) unlang_action_t pap_auth_pbkdf2_parse(rlm_rcode_t * base64 encoded and big endian */ } else { - (void)fr_strerror(); + fr_strerror_clear(); slen = fr_base64_decode((uint8_t *)&iterations, sizeof(iterations), (char const *)p, q - p); if (slen < 0) { RPEDEBUG("Failed decoding PBKDF2-Password iterations component (%.*s)", (int)(q - p), p);