# HG changeset patch # User ipse.c99@d525d15b-5824-0410-80a3-6185d19c2cde # Date 1183500880 0 # Node ID 5f2b8140b2cdd302630a047bd05d77b22dc32616 # Parent 5ce8bdb1369f39955a0d9fd86ff5bf1486b6a540 Explicitly cast to appropriate type INT8_MIN, INT16_MIN, INT32_MIN and INT64_MIN constants. Due to their unusual definition in Visual Studio headers (-_Ix_MAX-1) they are propagated to int and thus do not have expected type, causing VS6 strict compiler to claim about type inconsistency. diff --git a/stdint.h b/stdint.h --- a/stdint.h +++ b/stdint.h @@ -104,13 +104,13 @@ typedef uint64_t uintmax_t; #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 // 7.18.2.1 Limits of exact-width integer types -#define INT8_MIN _I8_MIN +#define INT8_MIN ((int8_t)_I8_MIN) #define INT8_MAX _I8_MAX -#define INT16_MIN _I16_MIN +#define INT16_MIN ((int16_t)_I16_MIN) #define INT16_MAX _I16_MAX -#define INT32_MIN _I32_MIN +#define INT32_MIN ((int32_t)_I32_MIN) #define INT32_MAX _I32_MAX -#define INT64_MIN _I64_MIN +#define INT64_MIN ((int64_t)_I64_MIN) #define INT64_MAX _I64_MAX #define UINT8_MAX _UI8_MAX #define UINT16_MAX _UI16_MAX