You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2015/07/25 17:47:19 UTC

lucy git commit: Always compile with warnings

Repository: lucy
Updated Branches:
  refs/heads/master 2b7c19429 -> c22e1a372


Always compile with warnings


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/c22e1a37
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/c22e1a37
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/c22e1a37

Branch: refs/heads/master
Commit: c22e1a3725f9be0555987621c51db5c4c0480f85
Parents: 2b7c194
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat Jul 25 17:43:32 2015 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sat Jul 25 17:43:32 2015 +0200

----------------------------------------------------------------------
 common/charmonizer.c    | 23 ++++++++++++++---------
 common/charmonizer.main | 17 ++++++++++-------
 2 files changed, 24 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/c22e1a37/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/common/charmonizer.c b/common/charmonizer.c
index b05a383..929a839 100644
--- a/common/charmonizer.c
+++ b/common/charmonizer.c
@@ -784,7 +784,7 @@ chaz_MakeFile_add_lemon_grammar(chaz_MakeFile *makefile,
  * @param obj The object file.
  * @param cflags Compiler flags.
  */
-void
+chaz_MakeRule*
 chaz_MakeFile_override_cflags(chaz_MakeFile *makefile, const char *obj,
                               chaz_CFlags *cflags);
 
@@ -4881,7 +4881,7 @@ chaz_MakeFile_add_lemon_grammar(chaz_MakeFile *makefile,
     return rule;
 }
 
-void
+chaz_MakeRule*
 chaz_MakeFile_override_cflags(chaz_MakeFile *makefile, const char *obj,
                               chaz_CFlags *cflags) {
     const char *obj_ext       = chaz_CC_obj_ext();
@@ -4920,6 +4920,8 @@ chaz_MakeFile_override_cflags(chaz_MakeFile *makefile, const char *obj,
 
     free(command);
     free(src);
+
+    return rule;
 }
 
 void
@@ -8084,11 +8086,13 @@ S_add_compiler_flags(struct chaz_CLI *cli) {
                 "-DLUCY_VALGRIND -fno-inline-functions");
         }
         else if (getenv("LUCY_DEBUG")) {
-            chaz_CFlags_append(extra_cflags,
-                "-DLUCY_DEBUG -pedantic -Wall -Wextra -Wno-variadic-macros");
-            if (chaz_CLI_defined(cli, "enable-perl")) {
-                chaz_CFlags_append(extra_cflags, "-DPERL_GCC_PEDANTIC");
-            }
+            chaz_CFlags_append(extra_cflags, "-DLUCY_DEBUG");
+        }
+
+        chaz_CFlags_append(extra_cflags,
+            "-pedantic -Wall -Wextra -Wno-variadic-macros");
+        if (chaz_CLI_defined(cli, "enable-perl")) {
+            chaz_CFlags_append(extra_cflags, "-DPERL_GCC_PEDANTIC");
         }
 
         /* Only core source files require this -- not our headers and
@@ -8099,9 +8103,10 @@ S_add_compiler_flags(struct chaz_CLI *cli) {
         /* Compile as C++ under MSVC. */
         chaz_CFlags_append(extra_cflags, "/TP");
 
+        chaz_CFlags_append(extra_cflags, "/W3");
         /* Thwart stupid warnings. */
-        chaz_CFlags_append(extra_cflags, "/D_CRT_SECURE_NO_WARNINGS");
-        chaz_CFlags_append(extra_cflags, "/D_SCL_SECURE_NO_WARNINGS");
+        chaz_CFlags_append(extra_cflags,
+	    "/D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /wd4996");
 
         if (chaz_Probe_msvc_version_num() < 1300) {
             /* Redefine 'for' to fix broken 'for' scoping under MSVC6. */

http://git-wip-us.apache.org/repos/asf/lucy/blob/c22e1a37/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/common/charmonizer.main b/common/charmonizer.main
index 1d00610..0ec90b8 100644
--- a/common/charmonizer.main
+++ b/common/charmonizer.main
@@ -199,11 +199,13 @@ S_add_compiler_flags(struct chaz_CLI *cli) {
                 "-DLUCY_VALGRIND -fno-inline-functions");
         }
         else if (getenv("LUCY_DEBUG")) {
-            chaz_CFlags_append(extra_cflags,
-                "-DLUCY_DEBUG -pedantic -Wall -Wextra -Wno-variadic-macros");
-            if (chaz_CLI_defined(cli, "enable-perl")) {
-                chaz_CFlags_append(extra_cflags, "-DPERL_GCC_PEDANTIC");
-            }
+            chaz_CFlags_append(extra_cflags, "-DLUCY_DEBUG");
+        }
+
+        chaz_CFlags_append(extra_cflags,
+            "-pedantic -Wall -Wextra -Wno-variadic-macros");
+        if (chaz_CLI_defined(cli, "enable-perl")) {
+            chaz_CFlags_append(extra_cflags, "-DPERL_GCC_PEDANTIC");
         }
 
         /* Only core source files require this -- not our headers and
@@ -214,9 +216,10 @@ S_add_compiler_flags(struct chaz_CLI *cli) {
         /* Compile as C++ under MSVC. */
         chaz_CFlags_append(extra_cflags, "/TP");
 
+        chaz_CFlags_append(extra_cflags, "/W3");
         /* Thwart stupid warnings. */
-        chaz_CFlags_append(extra_cflags, "/D_CRT_SECURE_NO_WARNINGS");
-        chaz_CFlags_append(extra_cflags, "/D_SCL_SECURE_NO_WARNINGS");
+        chaz_CFlags_append(extra_cflags,
+	    "/D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /wd4996");
 
         if (chaz_Probe_msvc_version_num() < 1300) {
             /* Redefine 'for' to fix broken 'for' scoping under MSVC6. */