]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
build: get CFLAGS (including -werror) used for examples and tests
authorDaniel Stenberg <daniel@haxx.se>
Fri, 23 Feb 2018 22:35:23 +0000 (23:35 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 4 Mar 2018 18:46:26 +0000 (19:46 +0100)
... so that the CI and more detects compiler warnings/errors properly!

Closes #2337

docs/examples/Makefile.am
tests/libtest/Makefile.am
tests/libtest/lib655.c
tests/unit/Makefile.am
tests/unit/unit1607.c

index afd35c20be3d3262f06e36ac9f5766225e009fa9..e5ed222ef1bbccab18f815ddf7c577dfe75064c6 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -53,6 +53,9 @@ else
 LDADD = $(LIBDIR)/libcurl.la
 endif
 
+# This might hold -Werror
+CFLAGS += @CURL_CFLAG_EXTRAS@
+
 # Makefile.inc provides the check_PROGRAMS and COMPLICATED_EXAMPLES defines
 include Makefile.inc
 
index a4e85ef0c241cc6bea0bdfc5da3e6d0b370b562f..0b8ebe9a93fbb758162deadb2685a9ed98a0b9aa 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -49,6 +49,8 @@ test1022.pl Makefile.inc notexists.pl CMakeLists.txt mk-lib1521.pl
 
 CFLAG_CURL_SYMBOL_HIDING = @CFLAG_CURL_SYMBOL_HIDING@
 
+CFLAGS += @CURL_CFLAG_EXTRAS@
+
 # Prevent LIBS from being used for all link targets
 LIBS = $(BLANK_AT_MAKETIME)
 
index f8719159841da02ac26e11ff2cbbf10796eaba95..8777b99edfa9355c6fc7f3bcf28d155f0a9fdfb8 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -23,7 +23,7 @@
 
 #include "memdebug.h"
 
-static const char TEST_DATA_STRING[] = "Test data";
+static const char *TEST_DATA_STRING = "Test data";
 static int cb_count = 0;
 
 static int
index 61b72c0db34eb20462a3e5161cbc845c55d6f7ea..fab82d2b06f3ee1b647e35d5b3cca4833be0f35e 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -50,6 +50,8 @@ endif
 
 EXTRA_DIST = Makefile.inc CMakeLists.txt
 
+CFLAGS += @CURL_CFLAG_EXTRAS@
+
 # Prevent LIBS from being used for all link targets
 LIBS = $(BLANK_AT_MAKETIME)
 
index 135030cac6cafb23cd2003f51aae4c6e6bd56a42..71c59939b197eed06079e79300498327399792c6 100644 (file)
@@ -28,7 +28,7 @@
 #include "memdebug.h" /* LAST include file */
 
 static struct Curl_easy *easy;
-struct curl_hash *hostcache;
+static struct curl_hash *hostcache;
 
 static void unit_stop(void)
 {