Fixup a few stricter warnings

This commit is contained in:
Matthew Brush 2013-03-04 20:41:46 -08:00
parent 23f8df7618
commit 838479689d
3 changed files with 4 additions and 3 deletions

View File

@ -117,7 +117,7 @@ static u_int32_t
hash_func(const void *key, size_t length) { hash_func(const void *key, size_t length) {
register size_t i = length; register size_t i = length;
register unsigned int hv = 0; /* could put a seed here instead of zero */ register unsigned int hv = 0; /* could put a seed here instead of zero */
register const unsigned char *s = (unsigned char *)key; register const unsigned char *s = (const unsigned char *)key;
while (i--) { while (i--) {
hv += *s++; hv += *s++;
hv += (hv << 10); hv += (hv << 10);

View File

@ -108,7 +108,7 @@ unlock_list(cfulist_t *list) {
} }
static CFU_INLINE cfulist_entry * static CFU_INLINE cfulist_entry *
new_list_entry() { new_list_entry(void) {
return calloc(1, sizeof(cfulist_entry)); return calloc(1, sizeof(cfulist_entry));
} }

View File

@ -285,10 +285,11 @@ _set_entry_val(cfuopt_list_entry_t *entry, const char *value) {
case cfuopt_arg_string: case cfuopt_arg_string:
if (entry->arg_data) *((char **)entry->arg_data) = cfustring_dup_c_str((char *)value); if (entry->arg_data) *((char **)entry->arg_data) = cfustring_dup_c_str((char *)value);
break; break;
case cfuopt_arg_invalid:
case cfuopt_arg_string_array:
default: default:
break; break;
} }
} }
typedef struct { typedef struct {