Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LrFwW-00026m-3c for qemu-devel@nongnu.org; Tue, 07 Apr 2009 14:22:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LrFwV-00024C-1e for qemu-devel@nongnu.org; Tue, 07 Apr 2009 14:22:39 -0400 Received: from [199.232.76.173] (port=55121 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrFwU-00023j-On for qemu-devel@nongnu.org; Tue, 07 Apr 2009 14:22:38 -0400 Received: from savannah.gnu.org ([199.232.41.3]:60810 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LrFwU-0003Ps-GD for qemu-devel@nongnu.org; Tue, 07 Apr 2009 14:22:38 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1LrFwT-0006lP-8q for qemu-devel@nongnu.org; Tue, 07 Apr 2009 18:22:37 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1LrFwS-0006lK-AT for qemu-devel@nongnu.org; Tue, 07 Apr 2009 18:22:36 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Tue, 07 Apr 2009 18:22:36 +0000 Subject: [Qemu-devel] [7017] Don't try to return result from a void function (spotted by Sparse) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 7017 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7017 Author: blueswir1 Date: 2009-04-07 18:22:35 +0000 (Tue, 07 Apr 2009) Log Message: ----------- Don't try to return result from a void function (spotted by Sparse) Modified Paths: -------------- trunk/hw/bt-hci.c trunk/hw/bt-hid.c trunk/hw/fw_cfg.c trunk/hw/lm832x.c trunk/hw/wm8750.c Modified: trunk/hw/bt-hci.c =================================================================== --- trunk/hw/bt-hci.c 2009-04-07 17:57:09 UTC (rev 7016) +++ trunk/hw/bt-hci.c 2009-04-07 18:22:35 UTC (rev 7017) @@ -564,9 +564,11 @@ switch (hci->lm.inquiry_mode) { case 0x00: - return bt_hci_inquiry_result_standard(hci, slave); + bt_hci_inquiry_result_standard(hci, slave); + return; case 0x01: - return bt_hci_inquiry_result_with_rssi(hci, slave); + bt_hci_inquiry_result_with_rssi(hci, slave); + return; default: fprintf(stderr, "%s: bad inquiry mode %02x\n", __FUNCTION__, hci->lm.inquiry_mode); @@ -771,9 +773,11 @@ struct bt_hci_s *hci = hci_from_device(link->slave); evt_conn_request params; - if (hci->conn_req_host) - return bt_hci_connection_reject(hci, link->host, - HCI_REJECTED_LIMITED_RESOURCES); + if (hci->conn_req_host) { + bt_hci_connection_reject(hci, link->host, + HCI_REJECTED_LIMITED_RESOURCES); + return; + } hci->conn_req_host = link->host; /* TODO: if masked and auto-accept, then auto-accept, * if masked and not auto-accept, then auto-reject */ @@ -2125,7 +2129,7 @@ /* TODO: notify upper layer */ struct bt_hci_s *s = opaque; - return s->info.evt_recv(s->info.opaque, s->evt_buf, len); + s->info.evt_recv(s->info.opaque, s->evt_buf, len); } static int bt_hci_bdaddr_set(struct HCIInfo *info, const uint8_t *bd_addr) @@ -2141,7 +2145,7 @@ { struct bt_hci_s *hci = hci_from_device(dev); - return bt_hci_done(&hci->info); + bt_hci_done(&hci->info); } struct HCIInfo *bt_new_hci(struct bt_scatternet_s *net) @@ -2196,9 +2200,11 @@ /* Be gentle and send DISCONNECT to all connected peers and those * currently waiting for us to accept or reject a connection request. * This frees the links. */ - if (hci->conn_req_host) - return bt_hci_connection_reject(hci, - hci->conn_req_host, HCI_OE_POWER_OFF); + if (hci->conn_req_host) { + bt_hci_connection_reject(hci, + hci->conn_req_host, HCI_OE_POWER_OFF); + return; + } for (handle = HCI_HANDLE_OFFSET; handle < (HCI_HANDLE_OFFSET | HCI_HANDLES_MAX); handle ++) Modified: trunk/hw/bt-hid.c =================================================================== --- trunk/hw/bt-hid.c 2009-04-07 17:57:09 UTC (rev 7016) +++ trunk/hw/bt-hid.c 2009-04-07 18:22:35 UTC (rev 7017) @@ -383,7 +383,7 @@ { struct bt_hid_device_s *hid = opaque; - return bt_hid_control_transaction(hid, data, len); + bt_hid_control_transaction(hid, data, len); } static void bt_hid_datain(void *opaque) Modified: trunk/hw/fw_cfg.c =================================================================== --- trunk/hw/fw_cfg.c 2009-04-07 17:57:09 UTC (rev 7016) +++ trunk/hw/fw_cfg.c 2009-04-07 18:22:35 UTC (rev 7017) @@ -108,7 +108,7 @@ static void fw_cfg_io_writeb(void *opaque, uint32_t addr, uint32_t value) { - return fw_cfg_write(opaque, (uint8_t)value); + fw_cfg_write(opaque, (uint8_t)value); } static void fw_cfg_io_writew(void *opaque, uint32_t addr, uint32_t value) @@ -124,7 +124,7 @@ static void fw_cfg_mem_writeb(void *opaque, target_phys_addr_t addr, uint32_t value) { - return fw_cfg_write(opaque, (uint8_t)value); + fw_cfg_write(opaque, (uint8_t)value); } static void fw_cfg_mem_writew(void *opaque, target_phys_addr_t addr, Modified: trunk/hw/lm832x.c =================================================================== --- trunk/hw/lm832x.c 2009-04-07 17:57:09 UTC (rev 7016) +++ trunk/hw/lm832x.c 2009-04-07 18:22:35 UTC (rev 7017) @@ -519,8 +519,10 @@ if ((s->status & INT_ERROR) && (s->error & ERR_FIFOOVR)) return; - if (s->kbd.len >= sizeof(s->kbd.fifo)) - return lm_kbd_error(s, ERR_FIFOOVR); + if (s->kbd.len >= sizeof(s->kbd.fifo)) { + lm_kbd_error(s, ERR_FIFOOVR); + return; + } s->kbd.fifo[(s->kbd.start + s->kbd.len ++) & (sizeof(s->kbd.fifo) - 1)] = key | (state << 7); Modified: trunk/hw/wm8750.c =================================================================== --- trunk/hw/wm8750.c 2009-04-07 17:57:09 UTC (rev 7016) +++ trunk/hw/wm8750.c 2009-04-07 18:22:35 UTC (rev 7017) @@ -706,7 +706,7 @@ { struct wm8750_s *s = (struct wm8750_s *) opaque; - return wm8750_out_flush(s); + wm8750_out_flush(s); } uint32_t wm8750_adc_dat(void *opaque)