From f9e61d1aa44d19afda2ea46b026463abada80b20 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 10 Feb 2005 07:46:34 -0500 Subject: COMP: Disabling warnings in zlib code to avoid changing it too much. --- Utilities/cmzlib/CMakeLists.txt | 8 ++++++++ Utilities/cmzlib/zconf.h | 8 ++++++++ 2 files changed, 16 insertions(+) (limited to 'Utilities/cmzlib') diff --git a/Utilities/cmzlib/CMakeLists.txt b/Utilities/cmzlib/CMakeLists.txt index 1c8c6e591e..02f8e10f71 100644 --- a/Utilities/cmzlib/CMakeLists.txt +++ b/Utilities/cmzlib/CMakeLists.txt @@ -3,6 +3,14 @@ INCLUDE_REGULAR_EXPRESSION("^(deflate|inf|trees|zconf|zlib|zutil).*$") INCLUDE_DIRECTORIES(${CMZLIB_SOURCE_DIR}) +# Tell the header files included from the .c files that they are being +# built. Used to disable warnings since we do not want to change the +# code much. +ADD_DEFINITIONS(-DCMZLIB_IN_C) + +# Match all headers for dependencies but complain about none. +INCLUDE_REGULAR_EXPRESSION("^.*$" "^$") + # source files for zlib SET(ZLIB_SRCS adler32.c gzio.c inftrees.c uncompr.c diff --git a/Utilities/cmzlib/zconf.h b/Utilities/cmzlib/zconf.h index 187d1358d6..52699bad57 100644 --- a/Utilities/cmzlib/zconf.h +++ b/Utilities/cmzlib/zconf.h @@ -1,4 +1,12 @@ #include "cm_zlib_mangle.h" + +/* Disable some warnings so that we do not have to change the code much. */ +#if defined(CMZLIB_IN_C) +# if defined(__BORLANDC__) +# pragma warn -8004 /* Variable assigned a value that is not used. */ +# endif +#endif + /* zconf.h -- configuration of the zlib compression library * Copyright (C) 1995-2002 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h -- cgit v1.2.1