diff options
author | Ralf Corsépius <ralf.corsepius@rtems.org> | 2013-04-17 12:19:33 +0200 |
---|---|---|
committer | Ralf Corsépius <ralf.corsepius@rtems.org> | 2013-04-17 12:23:34 +0200 |
commit | f205c18f0c182670e8fb48214227cbf4460215b2 (patch) | |
tree | 5b761e291455b7e8a0ab8a73b57f9ca6d04ab78d /testsuites/libtests/flashdisk01/test-file-system.c | |
parent | testsuites: Fix warnings (diff) | |
download | rtems-f205c18f0c182670e8fb48214227cbf4460215b2.tar.bz2 |
Use uint32_t instead of long. Use unsigned defines (Prevent overflows on 16bit targets)
Diffstat (limited to 'testsuites/libtests/flashdisk01/test-file-system.c')
-rw-r--r-- | testsuites/libtests/flashdisk01/test-file-system.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/testsuites/libtests/flashdisk01/test-file-system.c b/testsuites/libtests/flashdisk01/test-file-system.c index 11ceb3a4d8..10211c0f31 100644 --- a/testsuites/libtests/flashdisk01/test-file-system.c +++ b/testsuites/libtests/flashdisk01/test-file-system.c @@ -36,7 +36,7 @@ #define ASSERT_SC(sc) assert((sc) == RTEMS_SUCCESSFUL) -#define BUFFER_SIZE (32 * 1024) +#define BUFFER_SIZE (32U * 1024U) #define HEADER_SIZE 8 @@ -147,8 +147,8 @@ static uint32_t simple_random(uint32_t v) static unsigned get_bucket_with_random(unsigned count, long random) { - long unsigned unit = (1U << 31) / count; - long unsigned bucket = (long unsigned) random / unit; + uint32_t unit = ((uint32_t) 1U << 31) / count; + uint32_t bucket = (uint32_t) random / unit; if (bucket != count) { return bucket; |