From: Matthew Newton Date: Fri, 10 Nov 2017 21:33:12 +0000 (+0000) Subject: remove asserts on vars declared as nonnull X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=64c14ca6e2cf297ee634fa07c7ee4054b78dfc4b;p=thirdparty%2Ffreeradius-server.git remove asserts on vars declared as nonnull stops gcc6 complaints with -Wnonnull-compare --- diff --git a/src/main/client.c b/src/main/client.c index e7a0b534693..2229522e345 100644 --- a/src/main/client.c +++ b/src/main/client.c @@ -1095,9 +1095,6 @@ RADCLIENT *client_afrom_query(TALLOC_CTX *ctx, char const *identifier, char cons RADCLIENT *c; char buffer[128]; - rad_assert(identifier); - rad_assert(secret); - c = talloc_zero(ctx, RADCLIENT); if (fr_inet_pton(&c->ipaddr, identifier, -1, AF_UNSPEC, true, true) < 0) { diff --git a/src/main/log.c b/src/main/log.c index e875f648378..f66077110cc 100644 --- a/src/main/log.c +++ b/src/main/log.c @@ -238,8 +238,6 @@ void vradlog_request(fr_log_type_t type, fr_log_lvl_t lvl, REQUEST *request, cha fr_log_t *log_dst = uctx; - rad_assert(request); - /* * No output means no output. */ @@ -467,8 +465,6 @@ void radlog_request(fr_log_type_t type, fr_log_lvl_t lvl, REQUEST *request, char va_list ap; log_dst_t *dst_p; - rad_assert(request); - if (!request->log.dst) return; va_start(ap, msg); @@ -499,8 +495,6 @@ void radlog_request_error(fr_log_type_t type, fr_log_lvl_t lvl, REQUEST *request va_list ap; log_dst_t *dst_p; - rad_assert(request); - if (!request->log.dst) return; va_start(ap, msg); @@ -526,8 +520,6 @@ void radlog_request_perror(fr_log_type_t type, fr_log_lvl_t lvl, REQUEST *reques { char const *strerror; - rad_assert(request); - if (!request->log.dst) return; /* @@ -592,8 +584,6 @@ void radlog_request_marker(fr_log_type_t type, fr_log_lvl_t lvl, REQUEST *reques uint8_t unlang_indent; uint8_t module_indent; - rad_assert(request); - if (idx >= sizeof(spaces)) { size_t offset = (idx - (sizeof(spaces) - 1)) + (sizeof(spaces) * 0.75); idx -= offset;