mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Enforce that NDEBUG is not defined.
PuTTY is a security project, so assertions are important - if an assumption is violated, proceeding anyway may have far worse consequences than simple program termination. This check and #error should arrange that we don't ever accidentally compile assertions out.
This commit is contained in:
parent
af9910962a
commit
97f7a7cb4d
11
defs.h
11
defs.h
@ -11,6 +11,17 @@
|
||||
#ifndef PUTTY_DEFS_H
|
||||
#define PUTTY_DEFS_H
|
||||
|
||||
#ifdef NDEBUG
|
||||
/*
|
||||
* PuTTY is a security project, so assertions are important - if an
|
||||
* assumption is violated, proceeding anyway may have far worse
|
||||
* consequences than simple program termination. This check and #error
|
||||
* should arrange that we don't ever accidentally compile assertions
|
||||
* out.
|
||||
*/
|
||||
#error Do not compile this code base with NDEBUG defined!
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h> /* for __MINGW_PRINTF_FORMAT */
|
||||
|
Loading…
Reference in New Issue
Block a user