diff options
| author | cremno <[email protected]> | 2014-03-07 20:48:44 +0100 |
|---|---|---|
| committer | cremno <[email protected]> | 2014-03-07 20:48:44 +0100 |
| commit | 0c96b936dcbbc88ca1bacafa8b25d3e924839367 (patch) | |
| tree | 9a1a28d5d0da3e531b29f491cc27aed89e2a58cf | |
| parent | e5e5aadfa8c6b1c0a3f69b9d5dc2ae5ea10b8d29 (diff) | |
| download | mruby-0c96b936dcbbc88ca1bacafa8b25d3e924839367.tar.gz mruby-0c96b936dcbbc88ca1bacafa8b25d3e924839367.zip | |
MSVC: fix C4146
C4146 (unary minus operator applied to unsigned type, result still
unsigned)
| -rw-r--r-- | src/pool.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pool.c b/src/pool.c index f09df92c5..67eb4d2e5 100644 --- a/src/pool.c +++ b/src/pool.c @@ -5,6 +5,7 @@ */ #include <stddef.h> +#include <stdint.h> #include <string.h> #include "mruby.h" @@ -41,7 +42,7 @@ struct mrb_pool { #endif #ifdef POOL_ALIGNMENT -# define ALIGN_PADDING(x) ((-x) & (POOL_ALIGNMENT - 1)) +# define ALIGN_PADDING(x) ((SIZE_MAX - (x) + 1) & (POOL_ALIGNMENT - 1)) #else # define ALIGN_PADDING(x) (0) #endif |
