Fix a ton of compiler warnings
This patch fixes most of current reasons to generate compiler warnings.
The changes consist of:
- adding missing casts
- hiding or unhiding function declarations
- including headers where missing
- add __UNCONST when assigning a const char * to a char *
- adding missing return statements
- changing some types from unsigned to signed, as the code seems to want
signed ints
- converting old-style function definitions to current style (i.e.,
void func(param1, param2) short param1, param2; {...} to
void func (short param1, short param2) {...})
- making the compiler silent about signed vs unsigned comparisons. We
have too many of those in the new libc to fix.
A number of bugs in the test set were fixed. These bugs were never
triggered with our old libc. Consequently, these tests are now forced to
link with the new libc or they will generate errors (in particular tests 43
and 55).
Most changes in NetBSD libc are limited to moving aroudn "#ifndef __minix"
or stuff related to Minix-specific things (code in sys-minix or gen/minix).
This commit is contained in:
@@ -169,7 +169,9 @@ archive_entry_linkify(struct archive_entry_linkresolver *res,
|
||||
struct archive_entry **e, struct archive_entry **f)
|
||||
{
|
||||
struct links_entry *le;
|
||||
#ifndef __minix
|
||||
struct archive_entry *t;
|
||||
#endif
|
||||
|
||||
*f = NULL; /* Default: Don't return a second entry. */
|
||||
|
||||
|
||||
@@ -168,10 +168,10 @@ struct tar {
|
||||
int64_t entry_padding;
|
||||
int64_t realsize;
|
||||
#else
|
||||
size_t entry_bytes_remaining;
|
||||
int32_t entry_bytes_remaining;
|
||||
off_t entry_offset;
|
||||
off_t entry_padding;
|
||||
size_t realsize;
|
||||
int32_t realsize;
|
||||
#endif
|
||||
struct sparse_block *sparse_list;
|
||||
struct sparse_block *sparse_last;
|
||||
@@ -538,7 +538,7 @@ archive_read_format_tar_skip(struct archive_read *a)
|
||||
#ifndef __minix
|
||||
int64_t bytes_skipped;
|
||||
#else
|
||||
size_t bytes_skipped;
|
||||
int32_t bytes_skipped;
|
||||
#endif
|
||||
struct tar* tar;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user