Commit 856ae5c3324abb8fe6d905262e1cc9f4437e719f

Authored by blueswir1
1 parent 669b92ed

Fix a few Sparse warnings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7016 c046a42c-6fe2-441c-8c8c-71466251a162
block-raw-posix.c
@@ -876,15 +876,15 @@ static void raw_flush(BlockDriverState *bs) @@ -876,15 +876,15 @@ static void raw_flush(BlockDriverState *bs)
876 } 876 }
877 877
878 BlockDriver bdrv_raw = { 878 BlockDriver bdrv_raw = {
879 - "raw",  
880 - sizeof(BDRVRawState),  
881 - NULL, /* no probe for protocols */  
882 - raw_open,  
883 - NULL,  
884 - NULL,  
885 - raw_close,  
886 - raw_create,  
887 - raw_flush, 879 + .format_name = "raw",
  880 + .instance_size = sizeof(BDRVRawState),
  881 + .bdrv_probe = NULL, /* no probe for protocols */
  882 + .bdrv_open = raw_open,
  883 + .bdrv_read = raw_read,
  884 + .bdrv_write = raw_write,
  885 + .bdrv_close = raw_close,
  886 + .bdrv_create = raw_create,
  887 + .bdrv_flush = raw_flush,
888 888
889 #ifdef CONFIG_AIO 889 #ifdef CONFIG_AIO
890 .bdrv_aio_read = raw_aio_read, 890 .bdrv_aio_read = raw_aio_read,
@@ -893,8 +893,6 @@ BlockDriver bdrv_raw = { @@ -893,8 +893,6 @@ BlockDriver bdrv_raw = {
893 .aiocb_size = sizeof(RawAIOCB), 893 .aiocb_size = sizeof(RawAIOCB),
894 #endif 894 #endif
895 895
896 - .bdrv_read = raw_read,  
897 - .bdrv_write = raw_write,  
898 .bdrv_truncate = raw_truncate, 896 .bdrv_truncate = raw_truncate,
899 .bdrv_getlength = raw_getlength, 897 .bdrv_getlength = raw_getlength,
900 }; 898 };
@@ -212,8 +212,6 @@ command_loop(void) @@ -212,8 +212,6 @@ command_loop(void)
212 # include <histedit.h> 212 # include <histedit.h>
213 #endif 213 #endif
214 214
215 -extern char *progname;  
216 -  
217 static char * 215 static char *
218 get_prompt(void) 216 get_prompt(void)
219 { 217 {
@@ -75,4 +75,6 @@ enum { @@ -75,4 +75,6 @@ enum {
75 75
76 extern void timestr(struct timeval *tv, char *str, size_t sz, int flags); 76 extern void timestr(struct timeval *tv, char *str, size_t sz, int flags);
77 77
  78 +extern char *progname;
  79 +
78 #endif /* __COMMAND_H__ */ 80 #endif /* __COMMAND_H__ */
dma-helpers.c
@@ -81,7 +81,7 @@ static void dma_bdrv_unmap(DMAAIOCB *dbs) @@ -81,7 +81,7 @@ static void dma_bdrv_unmap(DMAAIOCB *dbs)
81 } 81 }
82 } 82 }
83 83
84 -void dma_bdrv_cb(void *opaque, int ret) 84 +static void dma_bdrv_cb(void *opaque, int ret)
85 { 85 {
86 DMAAIOCB *dbs = (DMAAIOCB *)opaque; 86 DMAAIOCB *dbs = (DMAAIOCB *)opaque;
87 target_phys_addr_t cur_addr, cur_len; 87 target_phys_addr_t cur_addr, cur_len;