summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorSitsofe Wheeler <sitsofe@yahoo.com>2020-08-19 23:02:48 +0100
committerSitsofe Wheeler <sitsofe@yahoo.com>2020-09-12 11:05:38 +0100
commit0a7022820e85299364e29113e16d35f4350361f6 (patch)
tree6253a370e609324958d8e9512c3916d3ab427042 /configure
parent695611a9d4cd554d44d8b2ec5da2811061950a2e (diff)
downloadfio-0a7022820e85299364e29113e16d35f4350361f6.tar.gz
fio-0a7022820e85299364e29113e16d35f4350361f6.tar.bz2
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 <sitsofe@yahoo.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure6
1 files changed, 4 insertions, 2 deletions
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