panic: declare as printf-style-checked
. and related fixes Change-Id: I5131ac57dc53d8aec8d421a34c5ceea383404d7a
This commit is contained in:
@@ -15,7 +15,7 @@ void ddekit_panic(char *fmt, ...)
|
||||
va_start(va,fmt);
|
||||
r = vprintf(fmt, va);
|
||||
va_end(va);
|
||||
panic("","",0);
|
||||
panic("panicced");
|
||||
|
||||
while(1)
|
||||
;
|
||||
|
||||
@@ -128,7 +128,7 @@ int devman_add_device(struct devman_dev *dev)
|
||||
}
|
||||
|
||||
if (msg.DEVMAN_RESULT != 0) {
|
||||
panic("devman_add_device: could add device: %d",
|
||||
panic("devman_add_device: could add device: %ld",
|
||||
msg.DEVMAN_RESULT);
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ int devman_del_device(struct devman_dev *dev)
|
||||
}
|
||||
|
||||
if (msg.DEVMAN_RESULT != 0) {
|
||||
panic("devman_del_device: could delete device: %d",
|
||||
panic("devman_del_device: could delete device: %ld",
|
||||
msg.DEVMAN_RESULT);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "local.h"
|
||||
|
||||
#define CHECKOUTOFMEM(ptr) if(ptr == NULL) \
|
||||
panic("Out of memory! (%s, line %d)" \
|
||||
panic("Out of memory! (%s, line %d)", \
|
||||
__FILE__, __LINE__)
|
||||
|
||||
|
||||
|
||||
@@ -472,7 +472,7 @@ int block_type; /* INODE_BLOCK, DIRECTORY_BLOCK, or whatever */
|
||||
printf("libminixfs: ENOSYS, disabling VM calls\n");
|
||||
vmcache = 0;
|
||||
} else {
|
||||
panic("libminixfs: setblock of 0x%lx dev 0x%x off "
|
||||
panic("libminixfs: setblock of %p dev 0x%x off "
|
||||
"0x%llx failed\n", bp->data, dev, dev_off);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,11 +17,11 @@ int vm_cachecall(message *m, int call, void *addr, u32_t dev, u64_t dev_offset,
|
||||
blocksize, PAGE_SIZE);
|
||||
|
||||
if(ino_offset % PAGE_SIZE)
|
||||
panic("inode offset %d should be a multiple of pagesize %d\n",
|
||||
panic("inode offset %lld should be a multiple of pagesize %d\n",
|
||||
ino_offset, PAGE_SIZE);
|
||||
|
||||
if(dev_offset % PAGE_SIZE)
|
||||
panic("dev offset offset %d should be a multiple of pagesize %d\n",
|
||||
panic("dev offset offset %lld should be a multiple of pagesize %d\n",
|
||||
dev_offset, PAGE_SIZE);
|
||||
|
||||
memset(m, 0, sizeof(*m));
|
||||
|
||||
@@ -59,7 +59,7 @@ int usb_send_urb(struct usb_urb* urb)
|
||||
}
|
||||
|
||||
if (msg.USB_RESULT != 0) {
|
||||
panic("usb_send_urb: hcd could not enqueue URB: %d", msg.USB_RESULT);
|
||||
panic("usb_send_urb: hcd could not enqueue URB: %ld", msg.USB_RESULT);
|
||||
}
|
||||
|
||||
/* everything ok, add urb to pending_urbs */
|
||||
@@ -145,7 +145,7 @@ int usb_init(char *name)
|
||||
}
|
||||
|
||||
if (msg.USB_RESULT != 0 ) {
|
||||
panic("usb_init: init failed: %d", msg.USB_RESULT);
|
||||
panic("usb_init: init failed: %ld", msg.USB_RESULT);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -498,7 +498,7 @@ clear_indirect_table(struct virtio_device *dev, struct vring_desc *vd)
|
||||
}
|
||||
|
||||
if (i >= dev->num_indirect)
|
||||
panic("%s: Could not clear indirect descriptor table ");
|
||||
panic("Could not clear indirect descriptor table ");
|
||||
}
|
||||
|
||||
|
||||
@@ -538,7 +538,7 @@ set_indirect_descriptors(struct virtio_device *dev, struct virtio_queue *q,
|
||||
|
||||
/* Sanity check */
|
||||
if (i >= dev->num_indirect)
|
||||
panic("%s: No indirect descriptor tables left");
|
||||
panic("No indirect descriptor tables left");
|
||||
|
||||
/* For indirect descriptor tables, only a single descriptor from
|
||||
* the main ring is used.
|
||||
|
||||
@@ -115,7 +115,7 @@ static int get_work(void)
|
||||
int r;
|
||||
|
||||
if ((r = sef_receive(ANY, &fs_m_in)) != OK)
|
||||
panic(__FILE__, "receive failed", r);
|
||||
panic("receive failed: %d", r);
|
||||
|
||||
return fs_m_in.m_type;
|
||||
}
|
||||
@@ -135,7 +135,7 @@ static void send_reply(int err, int transid)
|
||||
}
|
||||
|
||||
if ((r = send(fs_m_in.m_source, &fs_m_out)) != OK)
|
||||
panic(__FILE__, "unable to send reply", r);
|
||||
panic("unable to send reply: %d", r);
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
|
||||
Reference in New Issue
Block a user