MSVC: fix C4146

C4146 (unary minus operator applied to unsigned type, result still
unsigned)
This commit is contained in:
cremno
2014-03-07 20:48:44 +01:00
parent e5e5aadfa8
commit 0c96b936dc
+2 -1
View File
@@ -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