aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/bitops.c
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2010-01-18 17:46:37 -0900
committerDavid M. Syzdek <david@syzdek.net>2010-01-18 17:46:37 -0900
commitf016c73e5f1ef6d55ffd300374f40d72f882b8e6 (patch)
tree5f169f3bf0d4c5081735ce386f7b5d01e25b9f4f /src/bitops.c
parent0a7fc7739a9f730473582af735d701006f1016bd (diff)
downloaddmstools-f016c73e5f1ef6d55ffd300374f40d72f882b8e6.tar.gz
dmstools-f016c73e5f1ef6d55ffd300374f40d72f882b8e6.tar.bz2
dmstools-f016c73e5f1ef6d55ffd300374f40d72f882b8e6.tar.xz
dmstools-f016c73e5f1ef6d55ffd300374f40d72f882b8e6.zip
Fixing compiler warningsin bitops.
Diffstat (limited to 'src/bitops.c')
-rw-r--r--src/bitops.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bitops.c b/src/bitops.c
index 5fc0a07..99b2cff 100644
--- a/src/bitops.c
+++ b/src/bitops.c
@@ -142,7 +142,7 @@ const char * my_spaces(char * dst);
142uint32_t my_strtouint(const char * str); 142uint32_t my_strtouint(const char * str);
143 143
144//displays usage information 144//displays usage information
145void my_usage(); 145void my_usage(void);
146 146
147// displays version information 147// displays version information
148void my_version(void); 148void my_version(void);
@@ -331,13 +331,13 @@ const char * my_uint2str(char * dst, uint32_t num)
331/// @param[in] str string to convert 331/// @param[in] str string to convert
332uint32_t my_strtouint(const char * str) 332uint32_t my_strtouint(const char * str)
333{ 333{
334 if (!(strncmp(str, "0x", 2))) 334 if (!(strncmp(str, "0x", (size_t)2)))
335 return(strtoumax(&str[2], NULL, 16)); 335 return(strtoumax(&str[2], NULL, 16));
336 if (!(strncmp(str, "0X", 2))) 336 if (!(strncmp(str, "0X", (size_t)2)))
337 return(strtoumax(&str[2], NULL, 16)); 337 return(strtoumax(&str[2], NULL, 16));
338 if (!(strncmp(str, "00", 2))) 338 if (!(strncmp(str, "00", (size_t)2)))
339 return(strtoumax(str, NULL, 2)); 339 return(strtoumax(str, NULL, 2));
340 if (!(strncmp(str, "0", 1))) 340 if (!(strncmp(str, "0", (size_t)1)))
341 return(strtoumax(str, NULL, 8)); 341 return(strtoumax(str, NULL, 8));
342 return(strtoumax(str, NULL, 10)); 342 return(strtoumax(str, NULL, 10));
343} 343}