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:
@@ -7,6 +7,8 @@
|
||||
#include <minix/const.h>
|
||||
#include <minix/devman.h>
|
||||
#include <minix/safecopies.h>
|
||||
#include <minix/sysutil.h>
|
||||
#include <minix/ds.h>
|
||||
|
||||
#include "local.h"
|
||||
|
||||
@@ -192,7 +194,6 @@ PUBLIC endpoint_t devman_get_ep()
|
||||
PUBLIC int devman_init()
|
||||
{
|
||||
int res;
|
||||
message msg;
|
||||
|
||||
/* get the endpoint of the HCD */
|
||||
res = ds_retrieve_label_endpt("devman", &devman_ep);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <minix/const.h>
|
||||
#include <minix/devman.h>
|
||||
#include <minix/usb.h>
|
||||
#include <minix/sysutil.h>
|
||||
|
||||
#include "local.h"
|
||||
|
||||
@@ -291,7 +292,7 @@ PUBLIC int devman_usb_device_remove(struct devman_usb_dev *dev)
|
||||
/****************************************************************************
|
||||
* devman_usb_init *
|
||||
***************************************************************************/
|
||||
PUBLIC int devman_usb_init
|
||||
PUBLIC void devman_usb_init
|
||||
(int (*_bind_cb) (struct devman_usb_bind_cb_data *data, endpoint_t ep),
|
||||
int (*_unbind_cb) (struct devman_usb_bind_cb_data *data, endpoint_t ep))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user