Skip to content

Commit

Permalink
Fix a few Sparse warnings
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7016 c046a42c-6fe2-441c-8c8c-71466251a162
  • Loading branch information
blueswir1 committed Apr 7, 2009
1 parent 669b92e commit 856ae5c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
20 changes: 9 additions & 11 deletions block-raw-posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,15 +876,15 @@ static void raw_flush(BlockDriverState *bs)
}

BlockDriver bdrv_raw = {
"raw",
sizeof(BDRVRawState),
NULL, /* no probe for protocols */
raw_open,
NULL,
NULL,
raw_close,
raw_create,
raw_flush,
.format_name = "raw",
.instance_size = sizeof(BDRVRawState),
.bdrv_probe = NULL, /* no probe for protocols */
.bdrv_open = raw_open,
.bdrv_read = raw_read,
.bdrv_write = raw_write,
.bdrv_close = raw_close,
.bdrv_create = raw_create,
.bdrv_flush = raw_flush,

#ifdef CONFIG_AIO
.bdrv_aio_read = raw_aio_read,
Expand All @@ -893,8 +893,6 @@ BlockDriver bdrv_raw = {
.aiocb_size = sizeof(RawAIOCB),
#endif

.bdrv_read = raw_read,
.bdrv_write = raw_write,
.bdrv_truncate = raw_truncate,
.bdrv_getlength = raw_getlength,
};
Expand Down
2 changes: 0 additions & 2 deletions cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,6 @@ command_loop(void)
# include <histedit.h>
#endif

extern char *progname;

static char *
get_prompt(void)
{
Expand Down
2 changes: 2 additions & 0 deletions cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,6 @@ enum {

extern void timestr(struct timeval *tv, char *str, size_t sz, int flags);

extern char *progname;

#endif /* __COMMAND_H__ */
2 changes: 1 addition & 1 deletion dma-helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static void dma_bdrv_unmap(DMAAIOCB *dbs)
}
}

void dma_bdrv_cb(void *opaque, int ret)
static void dma_bdrv_cb(void *opaque, int ret)
{
DMAAIOCB *dbs = (DMAAIOCB *)opaque;
target_phys_addr_t cur_addr, cur_len;
Expand Down

0 comments on commit 856ae5c

Please sign in to comment.