diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-10-01 17:53:10 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-10-01 17:53:10 +0900 |
| commit | c3c882f681451c76ad6ffde984ec33432c5b579a (patch) | |
| tree | c2c8c4d14b50475923e6185ab4fe67e1ee2bc4af /src/etc.c | |
| parent | 8c408379aa173335569e8077c968076b4f9c69dd (diff) | |
| download | mruby-c3c882f681451c76ad6ffde984ec33432c5b579a.tar.gz mruby-c3c882f681451c76ad6ffde984ec33432c5b579a.zip | |
Use `uint32_t` to avoid signed integer overflow warning; #3816
Diffstat (limited to 'src/etc.c')
| -rw-r--r-- | src/etc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -91,7 +91,7 @@ mrb_float_id(mrb_float f) { const char *p = (const char*)&f; int len = sizeof(f); - mrb_int id = 0; + uint32_t id = 0; /* normalize -0.0 to 0.0 */ if (f == 0) f = 0.0; @@ -101,7 +101,7 @@ mrb_float_id(mrb_float f) } id = id + (id>>5); - return id; + return (mrb_int)id; } MRB_API mrb_int |
