diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-01-01 15:40:34 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-01-01 16:39:43 -0800 |
| commit | 4a45113ea17b87340a29d6e15862f8a11ae51a2d (patch) | |
| tree | 1258c0d9eccd1e696f7efc207d522a93ea991183 /src/core/options.h | |
| parent | a9e98e546c4cf40251435b3d0e84b9ac980a9623 (diff) | |
| download | nng-4a45113ea17b87340a29d6e15862f8a11ae51a2d.tar.gz nng-4a45113ea17b87340a29d6e15862f8a11ae51a2d.tar.bz2 nng-4a45113ea17b87340a29d6e15862f8a11ae51a2d.zip | |
silence compiler warning from minimum int constant
Diffstat (limited to 'src/core/options.h')
| -rw-r--r-- | src/core/options.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/options.h b/src/core/options.h index 9c5d4817..aff429df 100644 --- a/src/core/options.h +++ b/src/core/options.h @@ -13,8 +13,9 @@ #define CORE_OPTIONS_H // Integer limits. -#define NNI_MAXINT ((int) 2147483647) -#define NNI_MININT ((int) -2147483648) +#define NNI_MAXINT (2147483647) +// the -1 trick works around a compiler warning on some compilers (MSVC) +#define NNI_MININT (-2147483647 - 1) // We limit the maximum size to 4GB. That's intentional because some of the // underlying protocols cannot cope with anything bigger than 32-bits. |
