Repository: lucy-clownfish
Updated Branches:
  refs/heads/master ade0c09cc -> 8bfda8334


Fix more Windows compiler warnings


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

Branch: refs/heads/master
Commit: 67f835be955452315407f8e295f5e10de052f037
Parents: ade0c09
Author: Nick Wellnhofer <wellnho...@aevum.de>
Authored: Sat Jul 25 17:24:42 2015 +0200
Committer: Nick Wellnhofer <wellnho...@aevum.de>
Committed: Sat Jul 25 17:24:42 2015 +0200

----------------------------------------------------------------------
 compiler/common/charmonizer.c    | 8 ++++++--
 compiler/common/charmonizer.main | 8 ++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/67f835be/compiler/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/compiler/common/charmonizer.c b/compiler/common/charmonizer.c
index fb0835a..debae83 100644
--- a/compiler/common/charmonizer.c
+++ b/compiler/common/charmonizer.c
@@ -8005,11 +8005,15 @@ S_add_compiler_flags(struct chaz_CLI *cli) {
             /* Compile as C++ under MSVC11 and below. */
             chaz_CFlags_append(extra_cflags, "/TP");
         }
+       else {
+           /* Fix warnings in flex generated code. */
+           chaz_CFlags_append(extra_cflags, "/DYY_USE_CONST");
+       }
 
         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-clownfish/blob/67f835be/compiler/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/compiler/common/charmonizer.main b/compiler/common/charmonizer.main
index 0af5a78..0365656 100644
--- a/compiler/common/charmonizer.main
+++ b/compiler/common/charmonizer.main
@@ -118,11 +118,15 @@ S_add_compiler_flags(struct chaz_CLI *cli) {
             /* Compile as C++ under MSVC11 and below. */
             chaz_CFlags_append(extra_cflags, "/TP");
         }
+       else {
+           /* Fix warnings in flex generated code. */
+           chaz_CFlags_append(extra_cflags, "/DYY_USE_CONST");
+       }
 
         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. */

Reply via email to