diff options
author | Stefan Metzmacher <metze@samba.org> | 2020-03-19 09:54:48 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2020-03-19 17:12:41 +0100 |
commit | c42bd7816325c460f07036101aab282049cd72df (patch) | |
tree | 43bc101e6410e18e0504ba11056d6b586c20d3ee | |
parent | c8d013f3f484dc54748ca7132358ab8814d15c90 (diff) | |
download | resolv_wrapper-c42bd7816325c460f07036101aab282049cd72df.tar.gz resolv_wrapper-c42bd7816325c460f07036101aab282049cd72df.tar.xz resolv_wrapper-c42bd7816325c460f07036101aab282049cd72df.zip |
rwrap: fix warning where %s is always passed a NULL pointer in rwrap_create_fake_uri_rr()
This happens in Samba's gitlab pipeline on Fedora 30/31:
[3203/4410] Compiling third_party/resolv_wrapper/resolv_wrapper.c
==> /builds/samba-team/devel/samba/samba-o3.stderr <==
../../third_party/resolv_wrapper/resolv_wrapper.c: In function ‘rwrap_create_fake_uri_rr’:
../../third_party/resolv_wrapper/resolv_wrapper.c:104:33: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
104 | # define RWRAP_LOG(dbglvl, ...) rwrap_log((dbglvl), __func__, __VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../third_party/resolv_wrapper/resolv_wrapper.c:340:3: note: in expansion of macro ‘RWRAP_LOG’
340 | RWRAP_LOG(RWRAP_LOG_ERROR,
| ^~~~~~~~~
../../third_party/resolv_wrapper/resolv_wrapper.c:341:28: note: format string is defined here
341 | "Malformed URI entry [%s]\n", value);
| ^~
cc1: all warnings being treated as errors
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r-- | src/resolv_wrapper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolv_wrapper.c b/src/resolv_wrapper.c index bdf2c41..c88893e 100644 --- a/src/resolv_wrapper.c +++ b/src/resolv_wrapper.c @@ -309,7 +309,7 @@ static int rwrap_create_fake_uri_rr(const char *key, NEXT_KEY(str_prio, str_weight); if (uri == NULL) { RWRAP_LOG(RWRAP_LOG_ERROR, - "Malformed URI entry [%s]\n", value); + "Malformed URI entry [<null>]\n"); return -1; } |