Skip to content

Commit

Permalink
silence compiler warning from minimum int constant
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamore committed Jan 2, 2024
1 parent a9e98e5 commit 4a45113
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 4a45113

Please sign in to comment.