From: Sitsofe Wheeler Date: Wed, 19 Aug 2020 22:02:48 +0000 (+0100) Subject: configure: pass non-null pointer to (v)asprintf X-Git-Tag: fio-3.24~26^2~11 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=0a7022820e85299364e29113e16d35f4350361f6;p=fio.git configure: pass non-null pointer to (v)asprintf Windows clang warns about redefinition of (v)asprintf when targeting Windows 7 because the configure test failed due to passing NULL when to those functions when they tag key parameters with the nonnull attribute. Signed-off-by: Sitsofe Wheeler --- diff --git a/configure b/configure index 08571fb0..79a5134d 100755 --- a/configure +++ b/configure @@ -939,7 +939,8 @@ cat > $TMPC << EOF int main(int argc, char **argv) { - return asprintf(NULL, "%s", "str") == 0; + char *buf; + return asprintf(&buf, "%s", "str") == 0; } EOF if compile_prog "" "" "have_asprintf"; then @@ -956,7 +957,8 @@ cat > $TMPC << EOF int main(int argc, char **argv) { va_list ap; - return vasprintf(NULL, "%s", ap) == 0; + char *buf; + return vasprintf(&buf, "%s", ap) == 0; } EOF if compile_prog "" "" "have_vasprintf"; then