minix libraries: resolve clang warnings
Change-Id: I0f3425fb8838708c9848a006f1eee5ab1bad71d2
This commit is contained in:
parent
5dd8da10c5
commit
65f76edb8f
43 changed files with 110 additions and 109 deletions
|
@ -84,4 +84,8 @@ EXTERN special_file_t special_file[];
|
|||
#define READ_DMA 1
|
||||
#define WRITE_DMA 2
|
||||
|
||||
EXTERN int sef_cb_lu_prepare(int state);
|
||||
EXTERN int sef_cb_lu_state_isvalid(int state);
|
||||
EXTERN void sef_cb_lu_state_dump(int state);
|
||||
|
||||
#endif /* AUDIO_FW_H */
|
||||
|
|
|
@ -10,7 +10,7 @@ void blockdriver_mt_task(struct blockdriver *driver_tab);
|
|||
void blockdriver_mt_sleep(void);
|
||||
void blockdriver_mt_wakeup(thread_id_t id);
|
||||
void blockdriver_mt_terminate(void);
|
||||
void blockdriver_mt_set_workers(device_id_t id, int workers);
|
||||
void blockdriver_mt_set_workers(device_id_t id, unsigned int workers);
|
||||
thread_id_t blockdriver_mt_get_tid(void);
|
||||
|
||||
#endif /* _MINIX_BLOCKDRIVER_MT_H */
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
#define CM_PER_I2C1_CLKCTRL 0x048
|
||||
#define CM_WKUP_I2C0_CLKCTRL 0x4B8
|
||||
|
||||
int clkconf_init();
|
||||
int clkconf_init(void);
|
||||
int clkconf_set(u32_t clk, u32_t mask, u32_t value);
|
||||
int clkconf_release();
|
||||
int clkconf_release(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# Makefile for the common audio framework
|
||||
|
||||
NOGCCERROR=yes
|
||||
NOCLANGERROR=yes
|
||||
|
||||
CPPFLAGS+= -D_MINIX_SYSTEM
|
||||
|
||||
LIB= audiodriver
|
||||
|
|
|
@ -58,9 +58,6 @@ static int irq_hook_set = FALSE;
|
|||
static void sef_local_startup(void);
|
||||
static int sef_cb_init_fresh(int type, sef_init_info_t *info);
|
||||
static void sef_cb_signal_handler(int signo);
|
||||
EXTERN int sef_cb_lu_prepare(int state);
|
||||
EXTERN int sef_cb_lu_state_isvalid(int state);
|
||||
EXTERN void sef_cb_lu_state_dump(int state);
|
||||
|
||||
static struct chardriver audio_tab = {
|
||||
.cdr_open = msg_open, /* open the special file */
|
||||
|
@ -73,9 +70,6 @@ static struct chardriver audio_tab = {
|
|||
|
||||
int main(void)
|
||||
{
|
||||
int r, caller;
|
||||
message mess, repl_mess;
|
||||
int ipc_status;
|
||||
|
||||
/* SEF local startup. */
|
||||
sef_local_startup();
|
||||
|
@ -115,7 +109,7 @@ static void sef_local_startup(void)
|
|||
static int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
{
|
||||
/* Initialize the audio driver framework. */
|
||||
u32_t i; char irq;
|
||||
int i; char irq;
|
||||
static int executed = 0;
|
||||
sub_dev_t* sub_dev_ptr;
|
||||
|
||||
|
@ -499,7 +493,7 @@ static ssize_t msg_read(devminor_t minor, u64_t UNUSED(position),
|
|||
|
||||
static void msg_hardware(unsigned int UNUSED(mask))
|
||||
{
|
||||
u32_t i;
|
||||
int i;
|
||||
|
||||
/* loop over all sub devices */
|
||||
for ( i = 0; i < drv.NrOfSubDevices; i++) {
|
||||
|
@ -579,7 +573,6 @@ static void handle_int_write(int sub_dev_nr)
|
|||
static void handle_int_read(int sub_dev_nr)
|
||||
{
|
||||
sub_dev_t *sub_dev_ptr;
|
||||
message m;
|
||||
|
||||
sub_dev_ptr = &sub_dev[sub_dev_nr];
|
||||
|
||||
|
@ -651,7 +644,6 @@ static int get_started(sub_dev_t *sub_dev_ptr) {
|
|||
static void data_from_user(sub_dev_t *subdev)
|
||||
{
|
||||
int r;
|
||||
message m;
|
||||
|
||||
if (subdev->DmaLength == subdev->NrOfDmaFragments &&
|
||||
subdev->BufLength == subdev->NrOfExtraBuffers) return;/* no space */
|
||||
|
@ -710,7 +702,6 @@ static void data_from_user(sub_dev_t *subdev)
|
|||
static void data_to_user(sub_dev_t *sub_dev_ptr)
|
||||
{
|
||||
int r;
|
||||
message m;
|
||||
|
||||
if (!sub_dev_ptr->RevivePending) return; /* nobody is wating for data */
|
||||
if (sub_dev_ptr->BufLength == 0 && sub_dev_ptr->DmaLength == 0) return;
|
||||
|
@ -793,7 +784,7 @@ static int init_buffers(sub_dev_t *sub_dev_ptr)
|
|||
}
|
||||
|
||||
if ((left = dma_bytes_left(sub_dev_ptr->DmaPhys)) <
|
||||
sub_dev_ptr->DmaSize) {
|
||||
(unsigned int)sub_dev_ptr->DmaSize) {
|
||||
/* First half of buffer crosses a 64K boundary,
|
||||
* can't DMA into that */
|
||||
sub_dev_ptr->DmaPtr += left;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
NOGCCERROR=yes
|
||||
NOCLANGERROR=yes
|
||||
CPPFLAGS+= -D_MINIX_SYSTEM
|
||||
|
||||
# Makefile for libbdev
|
||||
.include <bsd.own.mk>
|
||||
|
||||
NOGCCERROR=yes
|
||||
|
||||
CPPFLAGS+= -D_MINIX_SYSTEM
|
||||
|
||||
LIB= bdev
|
||||
|
||||
SRCS= bdev.c driver.c call.c ipc.c minor.c
|
||||
|
|
|
@ -59,7 +59,7 @@ int bdev_minor_reopen(dev_t dev)
|
|||
}
|
||||
|
||||
if (m.m_lblockdriver_lbdev_reply.id != NO_ID) {
|
||||
printf("bdev: driver (%d) sent invalid ID (%ld)\n",
|
||||
printf("bdev: driver (%d) sent invalid ID (%d)\n",
|
||||
endpt, m.m_lblockdriver_lbdev_reply.id);
|
||||
return EINVAL;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
NOGCCERROR=yes
|
||||
NOCLANGERROR=yes
|
||||
CPPFLAGS+= -D_MINIX_SYSTEM
|
||||
|
||||
# Makefile for libblockdriver
|
||||
.include <bsd.own.mk>
|
||||
|
||||
NOGCCERROR=yes
|
||||
|
||||
CPPFLAGS+= -D_MINIX_SYSTEM
|
||||
|
||||
LIB= blockdriver
|
||||
|
||||
SRCS= driver.c drvlib.c driver_st.c driver_mt.c mq.c trace.c
|
||||
|
|
|
@ -98,7 +98,7 @@ void blockdriver_announce(int type)
|
|||
int r;
|
||||
char key[DS_MAX_KEYLEN];
|
||||
char label[DS_MAX_KEYLEN];
|
||||
char *driver_prefix = "drv.blk.";
|
||||
const char *driver_prefix = "drv.blk.";
|
||||
|
||||
/* Callers are allowed to use ipc_sendrec to communicate with drivers.
|
||||
* For this reason, there may blocked callers when a driver restarts.
|
||||
|
@ -223,9 +223,9 @@ static int do_vrdwt(struct blockdriver *bdp, message *mp, thread_id_t id)
|
|||
{
|
||||
/* Carry out an device read or write to/from a vector of buffers. */
|
||||
iovec_t iovec[NR_IOREQS];
|
||||
unsigned int nr_req;
|
||||
unsigned int i, nr_req;
|
||||
u64_t position;
|
||||
int i, do_write;
|
||||
int do_write;
|
||||
ssize_t r, size;
|
||||
|
||||
/* Copy the vector from the caller to kernel space. */
|
||||
|
@ -260,7 +260,7 @@ static int do_vrdwt(struct blockdriver *bdp, message *mp, thread_id_t id)
|
|||
/*===========================================================================*
|
||||
* do_dioctl *
|
||||
*===========================================================================*/
|
||||
static int do_dioctl(struct blockdriver *bdp, dev_t minor,
|
||||
static int do_dioctl(struct blockdriver *bdp, devminor_t minor,
|
||||
unsigned long request, endpoint_t endpt, cp_grant_id_t grant)
|
||||
{
|
||||
/* Carry out a disk-specific I/O control request. */
|
||||
|
@ -316,7 +316,7 @@ static int do_ioctl(struct blockdriver *bdp, message *mp)
|
|||
* to the tracing module, and handle setting/getting partitions when the driver
|
||||
* has specified that it is a disk driver.
|
||||
*/
|
||||
dev_t minor;
|
||||
devminor_t minor;
|
||||
unsigned long request;
|
||||
cp_grant_id_t grant;
|
||||
endpoint_t user_endpt;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#define TID_DEVICE(tid) ((tid) / MAX_WORKERS)
|
||||
#define TID_WORKER(tid) ((tid) % MAX_WORKERS)
|
||||
|
||||
typedef int worker_id_t;
|
||||
typedef unsigned int worker_id_t;
|
||||
|
||||
typedef enum {
|
||||
STATE_DEAD,
|
||||
|
@ -150,7 +150,7 @@ static void *worker_thread(void *param)
|
|||
device_t *dp;
|
||||
thread_id_t tid;
|
||||
message m;
|
||||
int ipc_status, r;
|
||||
int ipc_status;
|
||||
|
||||
wp = (worker_t *) param;
|
||||
assert(wp != NULL);
|
||||
|
@ -284,7 +284,8 @@ static void master_handle_message(message *m_ptr, int ipc_status)
|
|||
device_id_t id;
|
||||
worker_t *wp;
|
||||
device_t *dp;
|
||||
int r, wid;
|
||||
unsigned int wid;
|
||||
int r;
|
||||
|
||||
/* If this is not a block driver request, we cannot get the minor device
|
||||
* associated with it, and thus we can not tell which thread should process
|
||||
|
@ -488,7 +489,7 @@ void blockdriver_mt_wakeup(thread_id_t id)
|
|||
/*===========================================================================*
|
||||
* blockdriver_mt_set_workers *
|
||||
*===========================================================================*/
|
||||
void blockdriver_mt_set_workers(device_id_t id, int workers)
|
||||
void blockdriver_mt_set_workers(device_id_t id, unsigned int workers)
|
||||
{
|
||||
/* Set the number of worker threads for the given device.
|
||||
*/
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
#include "const.h"
|
||||
#include "trace.h"
|
||||
|
||||
#define NO_TRACEDEV ((dev_t) -1)
|
||||
#define NO_TRACEDEV ((devminor_t) -1)
|
||||
#define NO_TIME ((u32_t) -1)
|
||||
|
||||
static int trace_enabled = FALSE;
|
||||
static dev_t trace_dev = NO_TRACEDEV;
|
||||
static devminor_t trace_dev = NO_TRACEDEV;
|
||||
static btrace_entry *trace_buf = NULL;
|
||||
static size_t trace_size = 0;
|
||||
static size_t trace_pos;
|
||||
|
@ -48,7 +48,7 @@ static u32_t trace_gettime(void)
|
|||
/*===========================================================================*
|
||||
* trace_ctl *
|
||||
*===========================================================================*/
|
||||
int trace_ctl(dev_t minor, unsigned long request, endpoint_t endpt,
|
||||
int trace_ctl(devminor_t minor, unsigned long request, endpoint_t endpt,
|
||||
cp_grant_id_t grant)
|
||||
{
|
||||
/* Process a block trace control request.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _BLOCKDRIVER_TRACE_H
|
||||
#define _BLOCKDRIVER_TRACE_H
|
||||
|
||||
int trace_ctl(dev_t minor, unsigned long request, endpoint_t endpt,
|
||||
int trace_ctl(devminor_t minor, unsigned long request, endpoint_t endpt,
|
||||
cp_grant_id_t grant);
|
||||
|
||||
void trace_start(thread_id_t thread_id, message *m_ptr);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
NOGCCERROR=yes
|
||||
NOCLANGERROR=yes
|
||||
CPPFLAGS+= -D_MINIX_SYSTEM
|
||||
|
||||
# Makefile for libchardriver
|
||||
.include <bsd.own.mk>
|
||||
|
||||
NOGCCERROR=yes
|
||||
|
||||
CPPFLAGS+= -D_MINIX_SYSTEM
|
||||
|
||||
LIB= chardriver
|
||||
|
||||
SRCS= chardriver.c
|
||||
|
|
|
@ -102,7 +102,7 @@ void chardriver_announce(void)
|
|||
int r;
|
||||
char key[DS_MAX_KEYLEN];
|
||||
char label[DS_MAX_KEYLEN];
|
||||
char *driver_prefix = "drv.chr.";
|
||||
const char *driver_prefix = "drv.chr.";
|
||||
|
||||
/* Callers are allowed to use ipc_sendrec to communicate with drivers.
|
||||
* For this reason, there may blocked callers when a driver restarts.
|
||||
|
@ -456,7 +456,7 @@ void chardriver_process(struct chardriver *cdp, message *m_ptr, int ipc_status)
|
|||
/* Call the appropiate driver function, based on the type of request. Send a
|
||||
* reply to the caller if necessary.
|
||||
*/
|
||||
int r, reply;
|
||||
int r;
|
||||
|
||||
/* Check for notifications first. We never reply to notifications. */
|
||||
if (is_ipc_notify(ipc_status)) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
NOGCCERROR=yes
|
||||
NOCLANGERROR=yes
|
||||
#
|
||||
# Makefile for libclkconf
|
||||
|
||||
NOGCCERROR=yes
|
||||
|
||||
CPPFLAGS+= -D_SYSTEM -D_MINIX_SYSTEM
|
||||
|
||||
LIB= clkconf
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
NOGCCERROR=yes
|
||||
NOCLANGERROR=yes
|
||||
|
||||
CPPFLAGS+= -D_MINIX_SYSTEM
|
||||
|
||||
LIB = devman
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ static int save_string(char *buffer, char *src, size_t *offset)
|
|||
/****************************************************************************
|
||||
* serialize_dev *
|
||||
***************************************************************************/
|
||||
void *serialize_dev(struct devman_dev *dev, size_t *overall_size)
|
||||
static void *serialize_dev(struct devman_dev *dev, size_t *overall_size)
|
||||
{
|
||||
/* determine size of serialized version of dev */
|
||||
char *buffer;
|
||||
|
@ -179,14 +179,6 @@ int devman_del_device(struct devman_dev *dev)
|
|||
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* devman_get_ep *
|
||||
***************************************************************************/
|
||||
endpoint_t devman_get_ep(void)
|
||||
{
|
||||
return devman_ep;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* devman_init *
|
||||
***************************************************************************/
|
||||
|
|
|
@ -23,7 +23,7 @@ static int (*unbind_cb) (struct devman_usb_bind_cb_data *data, endpoint_t ep);
|
|||
***************************************************************************/
|
||||
static void
|
||||
devman_usb_add_attr
|
||||
(struct devman_dev *dev, char *name, char *data)
|
||||
(struct devman_dev *dev, const char *name, const char *data)
|
||||
{
|
||||
struct devman_static_attribute *attr = (struct devman_static_attribute *)
|
||||
malloc(sizeof(struct devman_static_attribute));
|
||||
|
|
|
@ -56,7 +56,7 @@ static int elf_ph_sane(Elf_Phdr *phdr)
|
|||
}
|
||||
|
||||
static int elf_unpack(char *exec_hdr,
|
||||
int hdr_len, Elf_Ehdr **hdr, Elf_Phdr **phdr)
|
||||
size_t hdr_len, Elf_Ehdr **hdr, Elf_Phdr **phdr)
|
||||
{
|
||||
if(hdr_len < sizeof(Elf_Ehdr))
|
||||
return ENOEXEC;
|
||||
|
@ -98,7 +98,7 @@ static int check_header(Elf_Ehdr *hdr)
|
|||
* Return <0 on error.
|
||||
*/
|
||||
int elf_has_interpreter(char *exec_hdr, /* executable header */
|
||||
int hdr_len, char *interp, int maxsz)
|
||||
size_t hdr_len, char *interp, size_t maxsz)
|
||||
{
|
||||
Elf_Ehdr *hdr = NULL;
|
||||
Elf_Phdr *phdr = NULL;
|
||||
|
|
|
@ -52,8 +52,9 @@ struct exec_info {
|
|||
vir_bytes stack_high; /* High stack addr */
|
||||
};
|
||||
|
||||
int elf_has_interpreter(char *exec_hdr, int hdr_len, char *interp, int maxsz);
|
||||
int elf_phdr(char *exec_hdr, int hdr_len, vir_bytes *phdr);
|
||||
int elf_has_interpreter(char *exec_hdr, size_t hdr_len, char *interp,
|
||||
size_t maxsz);
|
||||
int elf_phdr(char *exec_hdr, size_t hdr_len, vir_bytes *phdr);
|
||||
|
||||
int libexec_pm_newexec(endpoint_t proc_e, struct exec_info *execi);
|
||||
|
||||
|
|
|
@ -92,7 +92,8 @@ struct fetcherr {
|
|||
|
||||
void fetch_seterr(struct fetcherr *, int);
|
||||
void fetch_syserr(void);
|
||||
void fetch_info(const char *, ...);
|
||||
void fetch_info(const char *, ...)
|
||||
__attribute__((__format__(__printf__, 1, 2)));
|
||||
int fetch_default_port(const char *);
|
||||
int fetch_default_proxy_port(const char *);
|
||||
int fetch_bind(int, int, const char *);
|
||||
|
|
|
@ -199,6 +199,9 @@ ftp_chkerr(conn_t *conn)
|
|||
/*
|
||||
* Send a command and check reply
|
||||
*/
|
||||
static int ftp_cmd(conn_t *conn, const char *fmt, ...)
|
||||
__attribute__((__format__(__printf__, 2, 3)));
|
||||
|
||||
#ifndef __minix
|
||||
static int
|
||||
ftp_cmd(conn_t *conn, const char *fmt, ...)
|
||||
|
|
|
@ -406,6 +406,9 @@ static struct {
|
|||
/*
|
||||
* Send a formatted line; optionally echo to terminal
|
||||
*/
|
||||
static int http_cmd(conn_t *conn, const char *fmt, ...)
|
||||
__attribute__((__format__(__printf__, 2, 3)));
|
||||
|
||||
#ifndef __minix
|
||||
static int
|
||||
http_cmd(conn_t *conn, const char *fmt, ...)
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
# Makefile for libi2cdriver
|
||||
|
||||
NOGCCERROR=yes
|
||||
NOCLANGERROR=yes
|
||||
|
||||
CPPFLAGS+=-D_MINIX_SYSTEM
|
||||
|
||||
# Makefile for libi2cdriver
|
||||
|
||||
LIB= i2cdriver
|
||||
|
||||
SRCS= i2cdriver.c
|
||||
|
|
|
@ -15,7 +15,7 @@ i2cdriver_announce(uint32_t bus)
|
|||
int r;
|
||||
char key[DS_MAX_KEYLEN];
|
||||
char label[DS_MAX_KEYLEN];
|
||||
char *driver_prefix = "drv.i2c.";
|
||||
const char *driver_prefix = "drv.i2c.";
|
||||
|
||||
/* Callers are allowed to use ipc_sendrec to communicate with drivers.
|
||||
* For this reason, there may blocked callers when a driver restarts.
|
||||
|
@ -83,7 +83,7 @@ i2cdriver_bus_endpoint(uint32_t bus)
|
|||
{
|
||||
/* locate the driver for the i2c bus itself */
|
||||
int r;
|
||||
char *label_prefix = "i2c.";
|
||||
const char *label_prefix = "i2c.";
|
||||
char label[DS_MAX_KEYLEN];
|
||||
endpoint_t bus_endpoint;
|
||||
|
||||
|
@ -197,7 +197,8 @@ static int
|
|||
__i2creg_read(endpoint_t bus_endpoint, i2c_addr_t address, uint8_t raw,
|
||||
uint8_t reg, uint32_t * val, size_t vallen)
|
||||
{
|
||||
int r, i;
|
||||
uint32_t i;
|
||||
int r;
|
||||
minix_i2c_ioctl_exec_t ioctl_exec;
|
||||
|
||||
assert(val != NULL);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
NOGCCERROR=yes
|
||||
NOCLANGERROR=yes
|
||||
|
||||
LIB = lwip
|
||||
|
||||
|
|
|
@ -716,7 +716,8 @@ netif_loop_output(struct netif *netif, struct pbuf *p,
|
|||
netif_poll(). */
|
||||
|
||||
/* let last point to the last pbuf in chain r */
|
||||
for (last = r; last->next != NULL; last = last->next);
|
||||
for (last = r; last->next != NULL; last = last->next)
|
||||
;
|
||||
|
||||
SYS_ARCH_PROTECT(lev);
|
||||
if(netif->loop_first != NULL) {
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#include <minix/sysutil.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "lwip/sys.h"
|
||||
|
||||
u32_t sys_jiffies(void)
|
||||
{
|
||||
clock_t ticks;
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
NOGCCERROR=yes
|
||||
NOCLANGERROR=yes
|
||||
CPPFLAGS+= -D_MINIX_SYSTEM
|
||||
|
||||
# Makefile for libminixfs
|
||||
.include <bsd.own.mk>
|
||||
|
||||
NOGCCERROR=yes
|
||||
|
||||
CPPFLAGS+= -D_MINIX_SYSTEM
|
||||
|
||||
LIB= minixfs
|
||||
|
||||
SRCS= cache.c bio.c
|
||||
|
|
|
@ -39,7 +39,7 @@ static struct buf **buf_hash; /* the buffer hash table */
|
|||
static unsigned int nr_bufs;
|
||||
static int may_use_vmcache;
|
||||
|
||||
static int fs_block_size = PAGE_SIZE; /* raw i/o block size */
|
||||
static size_t fs_block_size = PAGE_SIZE; /* raw i/o block size */
|
||||
|
||||
static int rdwt_err;
|
||||
|
||||
|
@ -106,8 +106,8 @@ void lmfs_blockschange(dev_t dev, int delta)
|
|||
static int bitdelta = 0;
|
||||
bitdelta += delta;
|
||||
#define BANDKB (10*1024) /* recheck cache every 10MB change */
|
||||
if(bitdelta*fs_block_size/1024 > BANDKB ||
|
||||
bitdelta*fs_block_size/1024 < -BANDKB) {
|
||||
if(bitdelta*(int)fs_block_size/1024 > BANDKB ||
|
||||
bitdelta*(int)fs_block_size/1024 < -BANDKB) {
|
||||
lmfs_cache_reevaluate(dev);
|
||||
bitdelta = 0;
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ struct buf *lmfs_get_block(register dev_t dev, register block_t block,
|
|||
return lmfs_get_block_ino(dev, block, only_search, VMC_NO_INODE, 0);
|
||||
}
|
||||
|
||||
void munmap_t(void *a, int len)
|
||||
static void munmap_t(void *a, int len)
|
||||
{
|
||||
vir_bytes av = (vir_bytes) a;
|
||||
assert(a);
|
||||
|
@ -627,7 +627,7 @@ void lmfs_rw_scattered(
|
|||
static iovec_t iovec[NR_IOREQS];
|
||||
off_t pos;
|
||||
int iov_per_block;
|
||||
int start_in_use = bufs_in_use, start_bufqsize = bufqsize;
|
||||
unsigned int start_in_use = bufs_in_use, start_bufqsize = bufqsize;
|
||||
|
||||
assert(bufqsize >= 0);
|
||||
if(bufqsize == 0) return;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
NOGCCERROR=yes
|
||||
NOCLANGERROR=yes
|
||||
CPPFLAGS+= -D_MINIX_SYSTEM
|
||||
|
||||
# Makefile for libnetdriver
|
||||
|
||||
NOGCCERROR=yes
|
||||
|
||||
CPPFLAGS+= -D_MINIX_SYSTEM
|
||||
|
||||
LIB= netdriver
|
||||
|
||||
SRCS= netdriver.c
|
||||
|
|
|
@ -25,7 +25,7 @@ void netdriver_announce()
|
|||
int r;
|
||||
char key[DS_MAX_KEYLEN];
|
||||
char label[DS_MAX_KEYLEN];
|
||||
char *driver_prefix = "drv.net.";
|
||||
const char *driver_prefix = "drv.net.";
|
||||
|
||||
/* Publish a driver up event. */
|
||||
r = ds_retrieve_label_name(label, sef_self());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
NOGCCERROR=yes
|
||||
NOCLANGERROR=yes
|
||||
|
||||
CPPFLAGS+= -D_MINIX_SYSTEM
|
||||
|
||||
LIB = netsock
|
||||
|
|
|
@ -80,7 +80,7 @@ struct mq {
|
|||
|
||||
static struct mq * mq_head, *mq_tail;
|
||||
|
||||
int mq_enqueue(struct sock_req * req)
|
||||
static int mq_enqueue(struct sock_req * req)
|
||||
{
|
||||
struct mq * mq;
|
||||
|
||||
|
@ -317,7 +317,7 @@ static int netsock_close(devminor_t minor)
|
|||
|
||||
static int netsock_request(struct socket *sock, struct sock_req *req)
|
||||
{
|
||||
char *o;
|
||||
const char *o;
|
||||
|
||||
/*
|
||||
* If an operation is pending (blocking operation) or writing is
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
NOGCCERROR=yes
|
||||
NOCLANGERROR=yes
|
||||
|
||||
# Makefile for libdriver
|
||||
|
||||
NOGCCERROR=yes
|
||||
|
||||
CPPFLAGS+= -D_MINIX_SYSTEM
|
||||
|
||||
LIB = usb
|
||||
|
||||
SRCS = usb.c
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
static struct usb_urb * pending_urbs = NULL;
|
||||
static endpoint_t hcd_ep;
|
||||
|
||||
static void _usb_urb_complete(struct usb_driver *ud, long urb_id);
|
||||
static void _usb_urb_complete(struct usb_driver *ud, unsigned int urb_id);
|
||||
|
||||
/*****************************************************************************
|
||||
* usb_send_urb *
|
||||
|
@ -154,7 +154,7 @@ int usb_init(char *name)
|
|||
/*****************************************************************************
|
||||
* _usb_urb_complete *
|
||||
****************************************************************************/
|
||||
static void _usb_urb_complete(struct usb_driver *ud, long urb_id)
|
||||
static void _usb_urb_complete(struct usb_driver *ud, unsigned int urb_id)
|
||||
{
|
||||
/* find the corresponding URB in the urb_pending list. */
|
||||
struct usb_urb * urb = NULL;
|
||||
|
@ -186,7 +186,8 @@ static void _usb_urb_complete(struct usb_driver *ud, long urb_id)
|
|||
#endif
|
||||
ud->urb_completion(urb);
|
||||
} else {
|
||||
printf("WARN: _usb_urb_complete: did not find URB with ID %ld", urb_id);
|
||||
printf("WARN: _usb_urb_complete: did not find URB with ID %u",
|
||||
urb_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -210,7 +211,7 @@ int usb_handle_msg(struct usb_driver *ud, message *msg)
|
|||
|
||||
switch(msg->m_type) {
|
||||
case USB_COMPLETE_URB:
|
||||
_usb_urb_complete(ud, msg->USB_URB_ID);
|
||||
_usb_urb_complete(ud, (unsigned int)msg->USB_URB_ID);
|
||||
return 0;
|
||||
case USB_ANNOUCE_DEV:
|
||||
ud->connect_device(msg->USB_DEV_ID, msg->USB_INTERFACES);
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
NOGCCERROR=yes
|
||||
NOCLANGERROR=yes
|
||||
|
||||
# Makefile for libvassert library
|
||||
|
||||
NOGCCERROR=yes
|
||||
|
||||
MKPIC?= no
|
||||
LIB= vassert
|
||||
SRCS= backdoor.S vassert.c
|
||||
|
|
|
@ -61,7 +61,7 @@ void libvassert_process_backdoor(uint32, uint32, uint32, reg_t *, reg_t *,
|
|||
*---------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static void sig_segv(int sig_no)
|
||||
static void __dead sig_segv(int sig_no)
|
||||
{
|
||||
/* jumping to error handling in VAssert_IsInVM. */
|
||||
siglongjmp(segv_jmp, 1);
|
||||
|
@ -144,7 +144,7 @@ char VAssert_Init(void)
|
|||
libvassert_process_backdoor(CMD_SET_ADDRESS, page_address,
|
||||
MAGIC_PORT|(1<<16), &eax, &ebx, &ecx, &edx);
|
||||
|
||||
return (eax != -1) ? 0 : -1;
|
||||
return (eax != (uint32)-1) ? 0 : -1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -172,7 +172,7 @@ char VAssert_Uninit(void)
|
|||
return -1;
|
||||
}
|
||||
libvassert_process_backdoor(CMD_SET_ADDRESS, 0, MAGIC_PORT|(0<<16), &eax, &ebx, &ecx, &edx);
|
||||
return (eax != -1) ? 0 : 1;
|
||||
return (eax != (unsigned int)-1) ? 0 : 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -72,7 +72,8 @@ extern char VAssert_Uninit(void);
|
|||
/*
|
||||
* These functions should not be called directly; they need to be wrapped.
|
||||
*/
|
||||
extern void VAssert_LogMain(const char *format, ...);
|
||||
extern void VAssert_LogMain(const char *format, ...)
|
||||
__attribute__((__format__(__printf__, 1, 2)));
|
||||
extern void VAssert_GoLiveMain(void);
|
||||
extern void VAssert_ReturnToReplayMain(void);
|
||||
extern char VAssert_Trace(size_t max_size);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
NOGCCERROR=yes
|
||||
NOCLANGERROR=yes
|
||||
CPPFLAGS+= -D_MINIX_SYSTEM
|
||||
|
||||
# Makefile for libvirtio
|
||||
.include <bsd.own.mk>
|
||||
|
||||
NOGCCERROR=yes
|
||||
|
||||
CPPFLAGS+= -D_MINIX_SYSTEM
|
||||
|
||||
LIB= virtio
|
||||
|
||||
SRCS= virtio.c
|
||||
|
|
|
@ -549,7 +549,7 @@ set_indirect_descriptors(struct virtio_device *dev, struct virtio_queue *q,
|
|||
vd->len = num * sizeof(desc->descs[0]);
|
||||
|
||||
/* Initialize the descriptors in the indirect descriptor table */
|
||||
for (i = 0; i < num; i++) {
|
||||
for (i = 0; i < (int)num; i++) {
|
||||
ivd = &desc->descs[i];
|
||||
|
||||
use_vring_desc(ivd, &bufs[i]);
|
||||
|
|
|
@ -133,7 +133,7 @@ static inline void vring_init(struct vring *vr, unsigned int num, void *p,
|
|||
{
|
||||
vr->num = num;
|
||||
vr->desc = p;
|
||||
vr->avail = p + num*sizeof(struct vring_desc);
|
||||
vr->avail = (void *)((char *)p + num*sizeof(struct vring_desc));
|
||||
vr->used = (void *)(((unsigned long)&vr->avail->ring[num] + sizeof(u16_t)
|
||||
+ align-1) & ~(align - 1));
|
||||
}
|
||||
|
|
|
@ -6,8 +6,6 @@ CPPFLAGS+= -D_MINIX_SYSTEM
|
|||
|
||||
LIB= vtreefs
|
||||
|
||||
CPPFLAGS+= -I${NETBSDSRCDIR}/include
|
||||
|
||||
SRCS= \
|
||||
inode.c \
|
||||
link.c \
|
||||
|
|
Loading…
Reference in a new issue