bind9/lib/isc
Ondřej Surý 1eb5a77baa Set WarningLevel to Level1 for Release, treat warnings as errors
Our vcxproj files set the WarningLevel to Level3, which is too verbose
for a code that needs to be portable.  That basically leads to ignoring
all the errors that MSVC produces.  This commits downgrades the
WarningLevel to Level1 and enables treating warnings as errors for
Release builds.  For the Debug builds the WarningLevel got upgraded to
Level4, and treating warnings as errors is explicitly disabled.

We should eventually make the code clean of all MSVC warnings, but it's
a long way to go for Level4, so it's more reasonable to start at Level1.

For reference[1], these are the warning levels as described by MSVC
documentation:

  * /W0 suppresses all warnings. It's equivalent to /w.
  * /W1 displays level 1 (severe) warnings. /W1 is the default setting
    in the command-line compiler.
  * /W2 displays level 1 and level 2 (significant) warnings.
  * /W3 displays level 1, level 2, and level 3 (production quality)
    warnings. /W3 is the default setting in the IDE.
  * /W4 displays level 1, level 2, and level 3 warnings, and all level 4
    (informational) warnings that aren't off by default. We recommend
    that you use this option to provide lint-like warnings. For a new
    project, it may be best to use /W4 in all compilations. This option
    helps ensure the fewest possible hard-to-find code defects.
  * /Wall displays all warnings displayed by /W4 and all other warnings
    that /W4 doesn't include — for example, warnings that are off by
    default.
  * /WX treats all compiler warnings as errors. For a new project, it
    may be best to use /WX in all compilations; resolving all warnings
    ensures the fewest possible hard-to-find code defects.

1. https://docs.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level?view=vs-2019

(cherry picked from commit 789d253e3d)
2020-04-16 08:12:39 +02:00
..
alpha Bail-out early in the for install loops instead of continuing because for masks the error in the middle 2018-09-03 13:49:35 +02:00
ia64 Bail-out early in the for install loops instead of continuing because for masks the error in the middle 2018-09-03 13:49:35 +02:00
include Fix lists of installed header files 2020-03-06 13:09:47 +11:00
mips Bail-out early in the for install loops instead of continuing because for masks the error in the middle 2018-09-03 13:49:35 +02:00
nls Handle catopen() errors 2020-01-13 14:03:11 +01:00
noatomic Bail-out early in the for install loops instead of continuing because for masks the error in the middle 2018-09-03 13:49:35 +02:00
nothreads Bail-out early in the for install loops instead of continuing because for masks the error in the middle 2018-09-03 13:49:35 +02:00
powerpc Bail-out early in the for install loops instead of continuing because for masks the error in the middle 2018-09-03 13:49:35 +02:00
pthreads fix additional spelling errors 2020-02-24 22:04:43 -08:00
sparc64 Bail-out early in the for install loops instead of continuing because for masks the error in the middle 2018-09-03 13:49:35 +02:00
tests fix a pointer-to-int cast error 2020-03-17 13:16:07 -07:00
unix Just return tv_sec field 2020-03-18 06:36:10 +00:00
win32 Set WarningLevel to Level1 for Release, treat warnings as errors 2020-04-16 08:12:39 +02:00
x86_32 fix spelling errors reported by Fossies. 2020-02-21 14:09:59 -08:00
x86_64 fix spelling errors reported by Fossies. 2020-02-21 14:09:59 -08:00
.gitignore [master] update gitignore files; use rev-parse to get srcid 2014-06-17 13:49:30 -07:00
aes.c Fix missing config.h in win32/socket.c and replace config.h with <config.h> 2018-08-11 11:00:50 +02:00
api Adjust lib/isc/api version 2020-03-20 10:32:32 +01:00
app_api.c lib/isc/app_api.c: Protect the global is_running bool variable with a mutex 2019-08-06 15:03:35 +02:00
assertions.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:25:15 +02:00
backtrace-emptytbl.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:25:15 +02:00
backtrace.c Fix missing config.h in win32/socket.c and replace config.h with <config.h> 2018-08-11 11:00:50 +02:00
base32.c Ensure base64/base32/hex fields in DNS records that should be non-empty are. 2019-01-09 18:52:50 +11:00
base64.c Ensure base64/base32/hex fields in DNS records that should be non-empty are. 2019-01-09 18:52:50 +11:00
bind9.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 15:20:57 +02:00
buffer.c lib/isc/buffer.c: Fix invalid order of DbC checks that could cause dereference before NULL check 2019-10-03 14:21:46 +02:00
bufferlist.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:25:15 +02:00
chacha_private.h silence compiler warnings 2014-06-10 12:38:32 +10:00
commandline.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 15:20:57 +02:00
counter.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 15:20:57 +02:00
crc64.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-10 15:20:57 +02:00
entropy.c fix additional spelling errors 2020-02-24 22:04:43 -08:00
error.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:25:15 +02:00
event.c delay assignment until after REQUIRE 2020-02-08 06:32:42 -08:00
fsaccess.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 15:20:57 +02:00
hash.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 15:20:57 +02:00
heap.c delay assignment until after REQUIRE 2020-02-08 06:32:42 -08:00
hex.c Ensure base64/base32/hex fields in DNS records that should be non-empty are. 2019-01-09 18:52:50 +11:00
hmacmd5.c add #include <isc/util.h> 2019-03-20 11:41:51 +11:00
hmacsha.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 15:20:57 +02:00
ht.c delay assignment until after REQUIRE 2020-02-08 06:32:42 -08:00
httpd.c Clean the ENTER/EXIT/NOTICE debugging from production code 2020-02-08 11:46:37 -08:00
inet_aton.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-10 15:20:57 +02:00
inet_ntop.c improve clang / cmocka integration 2019-03-05 11:04:46 -08:00
inet_pton.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:25:15 +02:00
iterated_hash.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:25:15 +02:00
Kyuafile regen v9_11 2017-12-29 02:23:11 +00:00
lex.c delay assignment until after REQUIRE 2020-02-08 06:32:42 -08:00
lfsr.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-10 15:20:57 +02:00
lib.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 15:20:57 +02:00
log.c hurd: Fix build 2019-11-12 09:22:15 +01:00
Makefile.in Add reference SipHash 2-4 implementation 2019-07-22 08:09:48 -04:00
md5.c add #include <isc/util.h> 2019-03-20 11:41:51 +11:00
mem.c mem.c: delay assignment until after REQUIRE 2020-02-08 06:32:42 -08:00
mutexblock.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:25:15 +02:00
netaddr.c Hint the compiler with ISC_UNREACHABLE(); that code after INSIST(0); cannot be reached 2018-11-08 22:42:52 +07:00
netscope.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-10 15:20:57 +02:00
ondestroy.c delay assignment until after REQUIRE 2020-02-08 06:32:42 -08:00
parseint.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-10 15:20:57 +02:00
pk11.c lib/isc/pkc11.c: Fix possible NULL pointer dereference in push_attribute() 2019-10-03 14:21:46 +02:00
pk11_result.c update file headers to remove copyright years 2018-03-14 16:40:20 -07:00
pool.c expand the pool then copy over the old entries so we that failures do not break the old pool; also don't leak the new pool on error 2018-10-25 13:20:14 +11:00
portset.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 15:20:57 +02:00
print.c Fix 'Dead nested assignment' from scan-build-10 2020-03-26 13:52:28 +01:00
quota.c Backport isc_quota_getused() function 2019-11-06 12:54:40 +01:00
radix.c Turn (int & flag) into (int & flag) != 0 when implicitly typed to bool 2018-11-08 22:02:58 +07:00
random.c lib/isc/random.c: Suppress preprocessorErrorDirective error from Cppcheck 2019-10-03 14:21:47 +02:00
ratelimiter.c address or suppress cppcheck warnings 2019-09-12 19:31:56 +10:00
refcount.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:25:15 +02:00
regex.c fix spelling errors reported by Fossies. 2020-02-21 14:09:59 -08:00
region.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:25:15 +02:00
result.c Detect partial prefixes / incomplete IPv4 address in acls. 2019-10-14 22:12:16 +11:00
rwlock.c Convert all atomic operations in isc_rwlock to sequentially-consistent ordering 2020-02-11 21:20:14 +01:00
safe.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 15:20:57 +02:00
serial.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 15:20:57 +02:00
sha1.c Suppress cppcheck 1.89 false positive 2019-10-17 11:13:30 +02:00
sha2.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 15:20:57 +02:00
siphash.c Fix alignment issues in the native implementation of isc_siphash24() 2019-09-02 13:22:40 +02:00
sockaddr.c Remove randomly scattered additional style check suppressions that caused unmatchedSuppression 2019-10-03 14:21:47 +02:00
socket_api.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 15:20:57 +02:00
stats.c formally discard return value 2020-01-13 05:07:13 +00:00
string.c Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-10 15:20:57 +02:00
strtoul.c Remove duplicate config.h 2018-08-10 15:20:58 +02:00
symtab.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 15:20:57 +02:00
task.c delay assignment until after REQUIRE 2020-02-08 06:32:42 -08:00
task_p.h Replace custom isc_boolean_t with C standard bool type 2018-08-10 15:20:57 +02:00
taskpool.c Replace custom isc_boolean_t with C standard bool type 2018-08-10 15:20:57 +02:00
timer.c delay assignment until after REQUIRE 2020-02-08 06:32:42 -08:00
timer_p.h update file headers to remove copyright years 2018-03-14 16:40:20 -07:00
tm.c Turn (int & flag) into (int & flag) != 0 when implicitly typed to bool 2018-11-08 22:02:58 +07:00
version.c Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 14:25:15 +02:00