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
This commit is contained in:
Anthony Liguori 2012-01-13 10:17:49 -06:00
commit 607a2c72e5
15 changed files with 28 additions and 29 deletions

View File

@ -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;
}

View File

@ -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:

2
configure vendored
View File

@ -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

View File

@ -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,

2
exec.c
View File

@ -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__)

View File

@ -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;

8
hmp.c
View File

@ -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)

View File

@ -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;

View File

@ -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:

View File

@ -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();

View File

@ -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);

View File

@ -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"

View File

@ -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;

View File

@ -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.

View File

@ -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) {