windows compiler warnings

This commit is contained in:
Jeff Lenk
2013-04-01 17:09:37 -05:00
parent 511b2fc49a
commit d627f7c23d
10 changed files with 29 additions and 14 deletions

View File

@@ -152,7 +152,9 @@ hex_char_to_nibble(uint8_t c) {
default: return -1; /* this flags an error */
}
/* NOTREACHED */
#ifndef WIN32
return -1; /* this keeps compilers from complaining */
#endif
}
int
@@ -179,7 +181,7 @@ hex_string_to_octet_string(char *raw, char *hex, int len) {
tmp = hex_char_to_nibble(hex[0]);
if (tmp == -1)
return hex_len;
x = (tmp << 4);
x = (uint8_t)(tmp << 4);
hex_len++;
tmp = hex_char_to_nibble(hex[1]);
if (tmp == -1)
@@ -704,7 +706,7 @@ base64_string_to_octet_string(char *raw, char *base64, int len) {
tmp = base64_char_to_sextet(base64[0]);
if (tmp == -1)
return base64_len;
x = (tmp << 6);
x = (uint8_t)(tmp << 6);
base64_len++;
tmp = base64_char_to_sextet(base64[1]);
if (tmp == -1)

View File

@@ -24,7 +24,7 @@ debug_module_t mod_stat = {
err_status_t
stat_test_monobit(uint8_t *data) {
uint8_t *data_end = data + STAT_TEST_DATA_LEN;
uint16_t ones_count;
int ones_count;
ones_count = 0;
while (data < data_end) {