diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-13 10:17:49 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-13 10:17:49 -0600 |
commit | 607a2c72e52d6a7050c0eae1076b0b2976180d3e (patch) | |
tree | b8a3d36c398daf6f4d9979f61b16f89342eaa82e | |
parent | 20f8bd483c3ead658df7563d00768a9874ebb6f0 (diff) | |
parent | f7253270fc66a60e4faf639a3c4ce0b352553b24 (diff) |
Merge remote-tracking branch 'stefanha/trivial-patches' into HEAD
* stefanha/trivial-patches:
bt-host: add missing break statement
virtfs-proxy-helper: Add missing printf format attribute
virtfs-proxy-helper: Clean include files
virtfs-proxy-helper: Fix compilation on newer systems
hmp: Fix freeing of PciInfoList
Add 'fall through' comments to case statements without break
omap_dss: correct chip[1] index in RFBI_READ/RFBI_STATUS
vnc: fix no-lock-key-sync strncmp() length
vvfat: avoid leaking file descriptor in commit_one_file()
Spelling fixes in comments and documentation
tcg-arm: fix a typo in comments
configure: Modify detection of supported warning options
-rw-r--r-- | block/vvfat.c | 3 | ||||
-rw-r--r-- | bt-host.c | 1 | ||||
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | docs/writing-qmp-commands.txt | 2 | ||||
-rw-r--r-- | exec.c | 2 | ||||
-rw-r--r-- | fsdev/virtfs-proxy-helper.c | 19 | ||||
-rw-r--r-- | hmp.c | 8 | ||||
-rw-r--r-- | hw/omap_dss.c | 4 | ||||
-rw-r--r-- | hw/pcnet.c | 1 | ||||
-rw-r--r-- | json-lexer.c | 1 | ||||
-rw-r--r-- | memory.h | 4 | ||||
-rw-r--r-- | qemu-ga.c | 2 | ||||
-rw-r--r-- | qemu-option.c | 4 | ||||
-rw-r--r-- | tcg/arm/tcg-target.c | 2 | ||||
-rw-r--r-- | ui/vnc.c | 2 |
15 files changed, 28 insertions, 29 deletions
diff --git a/block/vvfat.c b/block/vvfat.c index eeffc4a4a8..9ef21ddfc5 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -2218,6 +2218,7 @@ static int commit_one_file(BDRVVVFATState* s, } if (offset > 0) { if (lseek(fd, offset, SEEK_SET) != offset) { + close(fd); g_free(cluster); return -3; } @@ -2238,11 +2239,13 @@ static int commit_one_file(BDRVVVFATState* s, (uint8_t*)cluster, (rest_size + 0x1ff) / 0x200); if (ret < 0) { + close(fd); g_free(cluster); return ret; } if (write(fd, cluster, rest_size) < 0) { + close(fd); g_free(cluster); return -2; } @@ -130,6 +130,7 @@ static void bt_host_read(void *opaque) pktlen = MIN(pkt[2] + 3, s->len); s->len -= pktlen; pkt += pktlen; + break; default: bad_pkt: @@ -1105,7 +1105,7 @@ cat > $TMPC << EOF int main(void) { return 0; } EOF for flag in $gcc_flags; do - if compile_prog "$flag -Werror" "" ; then + if compile_prog "-Werror $flag" "" ; then QEMU_CFLAGS="$QEMU_CFLAGS $flag" fi done diff --git a/docs/writing-qmp-commands.txt b/docs/writing-qmp-commands.txt index 0472fc3914..0ad51aa22a 100644 --- a/docs/writing-qmp-commands.txt +++ b/docs/writing-qmp-commands.txt @@ -435,7 +435,7 @@ There are a number of things to be noticed: for all QMP functions) 3. The "clock" variable (which will point to our QAPI type instance) is allocated by the regular g_malloc0() function. Note that we chose to - initialize the memory to zero. This is recomended for all QAPI types, as + initialize the memory to zero. This is recommended for all QAPI types, as it helps avoiding bad surprises (specially with booleans) 4. Remember that "next_deadline" is optional? All optional members have a 'has_TYPE_NAME' member that should be properly set by the implementation, @@ -511,7 +511,7 @@ static void code_gen_alloc(unsigned long tb_size) if (code_gen_buffer_size > (512 * 1024 * 1024)) code_gen_buffer_size = (512 * 1024 * 1024); #elif defined(__arm__) - /* Keep the buffer no bigger than 16GB to branch between blocks */ + /* Keep the buffer no bigger than 16MB to branch between blocks */ if (code_gen_buffer_size > 16 * 1024 * 1024) code_gen_buffer_size = 16 * 1024 * 1024; #elif defined(__s390x__) diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index 7f8def5b5d..4a507d860e 100644 --- a/fsdev/virtfs-proxy-helper.c +++ b/fsdev/virtfs-proxy-helper.c @@ -8,32 +8,21 @@ * This work is licensed under the terms of the GNU GPL, version 2. See * the COPYING file in the top-level directory. */ -#include <stdio.h> -#include <sys/socket.h> -#include <string.h> -#include <sys/un.h> -#include <limits.h> -#include <signal.h> -#include <errno.h> -#include <stdlib.h> + #include <sys/resource.h> -#include <sys/stat.h> #include <getopt.h> -#include <unistd.h> #include <syslog.h> #include <sys/capability.h> #include <sys/fsuid.h> -#include <stdarg.h> -#include <stdbool.h> #include <sys/vfs.h> -#include <sys/stat.h> -#include <attr/xattr.h> #include <sys/ioctl.h> #include <linux/fs.h> #ifdef CONFIG_LINUX_MAGIC_H #include <linux/magic.h> #endif #include "qemu-common.h" +#include "qemu_socket.h" +#include "qemu-xattr.h" #include "virtio-9p-marshal.h" #include "hw/9pfs/virtio-9p-proxy.h" #include "fsdev/virtio-9p-marshal.h" @@ -65,7 +54,7 @@ static struct option helper_opts[] = { static bool is_daemon; static bool get_version; /* IOC getversion IOCTL supported */ -static void do_log(int loglevel, const char *format, ...) +static void GCC_FMT_ATTR(2, 3) do_log(int loglevel, const char *format, ...) { va_list ap; @@ -486,17 +486,17 @@ static void hmp_info_pci_device(Monitor *mon, const PciDeviceInfo *dev) void hmp_info_pci(Monitor *mon) { - PciInfoList *info; + PciInfoList *info_list, *info; Error *err = NULL; - info = qmp_query_pci(&err); + info_list = qmp_query_pci(&err); if (err) { monitor_printf(mon, "PCI devices not supported\n"); error_free(err); return; } - for (; info; info = info->next) { + for (info = info_list; info; info = info->next) { PciDeviceInfoList *dev; for (dev = info->value->devices; dev; dev = dev->next) { @@ -504,7 +504,7 @@ void hmp_info_pci(Monitor *mon) } } - qapi_free_PciInfoList(info); + qapi_free_PciInfoList(info_list); } void hmp_quit(Monitor *mon, const QDict *qdict) diff --git a/hw/omap_dss.c b/hw/omap_dss.c index ede640b92e..86ed6ea5d9 100644 --- a/hw/omap_dss.c +++ b/hw/omap_dss.c @@ -793,7 +793,7 @@ static void omap_rfbi_write(void *opaque, target_phys_addr_t addr, if ((s->rfbi.control & (1 << 2)) && s->rfbi.chip[0]) s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 1); else if ((s->rfbi.control & (1 << 3)) && s->rfbi.chip[1]) - s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 1); + s->rfbi.rxbuf = s->rfbi.chip[1]->read(s->rfbi.chip[1]->opaque, 1); if (!-- s->rfbi.pixels) omap_rfbi_transfer_stop(s); break; @@ -802,7 +802,7 @@ static void omap_rfbi_write(void *opaque, target_phys_addr_t addr, if ((s->rfbi.control & (1 << 2)) && s->rfbi.chip[0]) s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 0); else if ((s->rfbi.control & (1 << 3)) && s->rfbi.chip[1]) - s->rfbi.rxbuf = s->rfbi.chip[0]->read(s->rfbi.chip[0]->opaque, 0); + s->rfbi.rxbuf = s->rfbi.chip[1]->read(s->rfbi.chip[1]->opaque, 0); if (!-- s->rfbi.pixels) omap_rfbi_transfer_stop(s); break; diff --git a/hw/pcnet.c b/hw/pcnet.c index cba253ba7b..306dc6ed7e 100644 --- a/hw/pcnet.c +++ b/hw/pcnet.c @@ -1505,6 +1505,7 @@ static void pcnet_bcr_writew(PCNetState *s, uint32_t rap, uint32_t val) #ifdef PCNET_DEBUG printf("BCR_SWS=0x%04x\n", val); #endif + /* fall through */ case BCR_LNKST: case BCR_LED1: case BCR_LED2: diff --git a/json-lexer.c b/json-lexer.c index c21338f66d..3cd3285825 100644 --- a/json-lexer.c +++ b/json-lexer.c @@ -301,6 +301,7 @@ static int json_lexer_feed_char(JSONLexer *lexer, char ch, bool flush) case JSON_KEYWORD: case JSON_STRING: lexer->emit(lexer, lexer->token, new_state, lexer->x, lexer->y); + /* fall through */ case JSON_SKIP: QDECREF(lexer->token); lexer->token = qstring_new(); @@ -561,7 +561,7 @@ void memory_region_add_subregion_overlap(MemoryRegion *mr, * memory_region_get_ram_addr: Get the ram address associated with a memory * region * - * DO NOT USE THIS FUCNTION. This is a temporary workaround while the Xen + * DO NOT USE THIS FUNCTION. This is a temporary workaround while the Xen * code is being reworked. */ ram_addr_t memory_region_get_ram_addr(MemoryRegion *mr); @@ -650,7 +650,7 @@ void memory_global_sync_dirty_bitmap(MemoryRegion *address_space); * memory_region_transaction_begin: Start a transaction. * * During a transaction, changes will be accumulated and made visible - * only when the transaction ends (is commited). + * only when the transaction ends (is committed). */ void memory_region_transaction_begin(void); @@ -92,7 +92,7 @@ static void usage(const char *cmd) " -v, --verbose log extra debugging information\n" " -V, --version print version information and exit\n" " -d, --daemonize become a daemon\n" -" -b, --blacklist comma-seperated list of RPCs to disable (no spaces, \"?\"" +" -b, --blacklist comma-separated list of RPCs to disable (no spaces, \"?\"" " to list available RPCs)\n" " -h, --help display this help and exit\n" "\n" diff --git a/qemu-option.c b/qemu-option.c index 6b23c31235..a303f87e1c 100644 --- a/qemu-option.c +++ b/qemu-option.c @@ -214,13 +214,17 @@ static int parse_option_size(const char *name, const char *value, uint64_t *ret) switch (*postfix) { case 'T': sizef *= 1024; + /* fall through */ case 'G': sizef *= 1024; + /* fall through */ case 'M': sizef *= 1024; + /* fall through */ case 'K': case 'k': sizef *= 1024; + /* fall through */ case 'b': case '\0': *ret = (uint64_t) sizef; diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c index 1d327984e0..5b233f564c 100644 --- a/tcg/arm/tcg-target.c +++ b/tcg/arm/tcg-target.c @@ -843,7 +843,7 @@ static inline void tcg_out_st8(TCGContext *s, int cond, } /* The _goto case is normally between TBs within the same code buffer, - * and with the code buffer limited to 16GB we shouldn't need the long + * and with the code buffer limited to 16MB we shouldn't need the long * case. * * .... except to the prologue that is in its own buffer. @@ -2763,7 +2763,7 @@ int vnc_display_open(DisplayState *ds, const char *display) password = 1; /* Require password auth */ } else if (strncmp(options, "reverse", 7) == 0) { reverse = 1; - } else if (strncmp(options, "no-lock-key-sync", 9) == 0) { + } else if (strncmp(options, "no-lock-key-sync", 16) == 0) { lock_key_sync = 0; #ifdef CONFIG_VNC_SASL } else if (strncmp(options, "sasl", 4) == 0) { |