trivial patches for 2015-12-04
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJWYTVXAAoJEL7lnXSkw9fbrMUH/1HGP6+Rki8Q9yATYiYyxaE+ BLHXwUEVpN+zlH98MW5Ezoj9UJrJg6OE+vhmiOpf09Qe1oGRwzMLwm5VsgA00/B5 aGfGx3Ao7jG5aNNCOyeBVFRZED3j56ieMTe2EponpQiA8fV8itta90nIbfTRVP+J 9FRAUriKpeVJaYyGR77+aHELQS9q6eTlJ5w9FxsxAhy1FzT5BrE2VWye+sn83/eT SQnDEy8UXupNN6Gr2GS7RgfoLrJiZ8VM3EHv3FIRIMDXZkXmW49WeNo+AmN6krPM Gwgl4HCbzjTlHWBlehFGa2McxczfcQiAMpoT7gm6Anf0w09BO9+Oh3smfFvePEw= =3qeW -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-12-04' into staging trivial patches for 2015-12-04 # gpg: Signature made Fri 04 Dec 2015 06:40:23 GMT using RSA key ID A4C3D7DB # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" * remotes/mjt/tags/pull-trivial-patches-2015-12-04: bt: check struct sizes typedefs: Put them back into alphabetical order scsi: remove scsi_req_free prototype gt64xxx: fix decoding of ISD register configure: use appropriate code fragment for -fstack-protector checks crypto: avoid two coverity false positive error reports configure: Diagnose broken linkers directly bt: avoid unintended sign extension util/id: fully allocate names table Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
61e3aa25b1
13
configure
vendored
13
configure
vendored
@ -1428,6 +1428,9 @@ if compile_object ; then
|
||||
else
|
||||
error_exit "\"$cc\" either does not exist or does not work"
|
||||
fi
|
||||
if ! compile_prog ; then
|
||||
error_exit "\"$cc\" cannot build an executable (is your linker broken?)"
|
||||
fi
|
||||
|
||||
# Check that the C++ compiler exists and works with the C compiler
|
||||
if has $cxx; then
|
||||
@ -1488,6 +1491,16 @@ for flag in $gcc_flags; do
|
||||
done
|
||||
|
||||
if test "$stack_protector" != "no"; then
|
||||
cat > $TMPC << EOF
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char arr[64], *p = arr, *c = argv[0];
|
||||
while (*c) {
|
||||
*p++ = *c++;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
gcc_flags="-fstack-protector-strong -fstack-protector-all"
|
||||
sp_on=0
|
||||
for flag in $gcc_flags; do
|
||||
|
@ -123,10 +123,10 @@ qcrypto_tls_creds_get_path(QCryptoTLSCreds *creds,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
trace_qcrypto_tls_creds_get_path(creds, filename,
|
||||
*cred ? *cred : "<none>");
|
||||
ret = 0;
|
||||
cleanup:
|
||||
trace_qcrypto_tls_creds_get_path(creds, filename,
|
||||
*cred ? *cred : "<none>");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -255,6 +255,7 @@ qcrypto_tls_creds_check_cert_key_purpose(QCryptoTLSCredsX509 *creds,
|
||||
}
|
||||
|
||||
g_free(buffer);
|
||||
buffer = NULL;
|
||||
}
|
||||
|
||||
if (isServer) {
|
||||
|
@ -42,7 +42,7 @@ struct bt_l2cap_sdp_state_s {
|
||||
|
||||
static ssize_t sdp_datalen(const uint8_t **element, ssize_t *left)
|
||||
{
|
||||
size_t len = *(*element) ++ & SDP_DSIZE_MASK;
|
||||
uint32_t len = *(*element) ++ & SDP_DSIZE_MASK;
|
||||
|
||||
if (!*left)
|
||||
return -1;
|
||||
|
@ -275,7 +275,8 @@ static void check_reserved_space (hwaddr *start,
|
||||
|
||||
static void gt64120_isd_mapping(GT64120State *s)
|
||||
{
|
||||
hwaddr start = s->regs[GT_ISD] << 21;
|
||||
/* Bits 14:0 of ISD map to bits 35:21 of the start address. */
|
||||
hwaddr start = ((hwaddr)s->regs[GT_ISD] << 21) & 0xFFFE00000ull;
|
||||
hwaddr length = 0x1000;
|
||||
|
||||
if (s->ISD_length) {
|
||||
|
@ -504,7 +504,6 @@ typedef struct {
|
||||
|
||||
#define OCF_CREATE_CONN_CANCEL 0x0008
|
||||
typedef struct {
|
||||
uint8_t status;
|
||||
bdaddr_t bdaddr;
|
||||
} QEMU_PACKED create_conn_cancel_cp;
|
||||
#define CREATE_CONN_CANCEL_CP_SIZE 6
|
||||
@ -1266,13 +1265,13 @@ typedef struct {
|
||||
uint8_t status;
|
||||
uint16_t handle;
|
||||
} QEMU_PACKED reset_failed_contact_counter_rp;
|
||||
#define RESET_FAILED_CONTACT_COUNTER_RP_SIZE 4
|
||||
#define RESET_FAILED_CONTACT_COUNTER_RP_SIZE 3
|
||||
|
||||
#define OCF_READ_LINK_QUALITY 0x0003
|
||||
typedef struct {
|
||||
uint16_t handle;
|
||||
} QEMU_PACKED read_link_quality_cp;
|
||||
#define READ_LINK_QUALITY_CP_SIZE 4
|
||||
#define READ_LINK_QUALITY_CP_SIZE 2
|
||||
|
||||
typedef struct {
|
||||
uint8_t status;
|
||||
@ -1332,7 +1331,7 @@ typedef struct {
|
||||
uint8_t dev_class[3];
|
||||
uint16_t clock_offset;
|
||||
} QEMU_PACKED inquiry_info;
|
||||
#define INQUIRY_INFO_SIZE 14
|
||||
#define INQUIRY_INFO_SIZE 15
|
||||
|
||||
#define EVT_CONN_COMPLETE 0x03
|
||||
typedef struct {
|
||||
@ -1381,7 +1380,7 @@ typedef struct {
|
||||
uint16_t handle;
|
||||
uint8_t encrypt;
|
||||
} QEMU_PACKED evt_encrypt_change;
|
||||
#define EVT_ENCRYPT_CHANGE_SIZE 5
|
||||
#define EVT_ENCRYPT_CHANGE_SIZE 4
|
||||
|
||||
#define EVT_CHANGE_CONN_LINK_KEY_COMPLETE 0x09
|
||||
typedef struct {
|
||||
@ -1629,18 +1628,6 @@ typedef struct {
|
||||
} QEMU_PACKED evt_sniff_subrate;
|
||||
#define EVT_SNIFF_SUBRATE_SIZE 11
|
||||
|
||||
#define EVT_EXTENDED_INQUIRY_RESULT 0x2F
|
||||
typedef struct {
|
||||
bdaddr_t bdaddr;
|
||||
uint8_t pscan_rep_mode;
|
||||
uint8_t pscan_period_mode;
|
||||
uint8_t dev_class[3];
|
||||
uint16_t clock_offset;
|
||||
int8_t rssi;
|
||||
uint8_t data[240];
|
||||
} QEMU_PACKED extended_inquiry_info;
|
||||
#define EXTENDED_INQUIRY_INFO_SIZE 254
|
||||
|
||||
#define EVT_TESTING 0xFE
|
||||
|
||||
#define EVT_VENDOR 0xFF
|
||||
|
@ -250,7 +250,6 @@ SCSIRequest *scsi_req_alloc(const SCSIReqOps *reqops, SCSIDevice *d,
|
||||
SCSIRequest *scsi_req_new(SCSIDevice *d, uint32_t tag, uint32_t lun,
|
||||
uint8_t *buf, void *hba_private);
|
||||
int32_t scsi_req_enqueue(SCSIRequest *req);
|
||||
void scsi_req_free(SCSIRequest *req);
|
||||
SCSIRequest *scsi_req_ref(SCSIRequest *req);
|
||||
void scsi_req_unref(SCSIRequest *req);
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
/* A load of opaque types so that device init declarations don't have to
|
||||
pull in all the real definitions. */
|
||||
struct Monitor;
|
||||
|
||||
/* Please keep this list in alphabetical order */
|
||||
typedef struct AdapterInfo AdapterInfo;
|
||||
@ -19,8 +18,8 @@ typedef struct BusState BusState;
|
||||
typedef struct CharDriverState CharDriverState;
|
||||
typedef struct CompatProperty CompatProperty;
|
||||
typedef struct CPUAddressSpace CPUAddressSpace;
|
||||
typedef struct DeviceState DeviceState;
|
||||
typedef struct DeviceListener DeviceListener;
|
||||
typedef struct DeviceState DeviceState;
|
||||
typedef struct DisplayChangeListener DisplayChangeListener;
|
||||
typedef struct DisplayState DisplayState;
|
||||
typedef struct DisplaySurface DisplaySurface;
|
||||
@ -46,6 +45,7 @@ typedef struct MigrationIncomingState MigrationIncomingState;
|
||||
typedef struct MigrationParams MigrationParams;
|
||||
typedef struct MigrationState MigrationState;
|
||||
typedef struct Monitor Monitor;
|
||||
typedef struct MonitorDef MonitorDef;
|
||||
typedef struct MouseTransformInfo MouseTransformInfo;
|
||||
typedef struct MSIMessage MSIMessage;
|
||||
typedef struct NetClientState NetClientState;
|
||||
@ -63,13 +63,13 @@ typedef struct PCIESlot PCIESlot;
|
||||
typedef struct PCIExpressDevice PCIExpressDevice;
|
||||
typedef struct PCIExpressHost PCIExpressHost;
|
||||
typedef struct PCIHostState PCIHostState;
|
||||
typedef struct PCMachineState PCMachineState;
|
||||
typedef struct PCMachineClass PCMachineClass;
|
||||
typedef struct PCMachineState PCMachineState;
|
||||
typedef struct PCMCIACardState PCMCIACardState;
|
||||
typedef struct PixelFormat PixelFormat;
|
||||
typedef struct PostcopyDiscardState PostcopyDiscardState;
|
||||
typedef struct PropertyInfo PropertyInfo;
|
||||
typedef struct Property Property;
|
||||
typedef struct PropertyInfo PropertyInfo;
|
||||
typedef struct QEMUBH QEMUBH;
|
||||
typedef struct QemuConsole QemuConsole;
|
||||
typedef struct QEMUFile QEMUFile;
|
||||
@ -78,10 +78,10 @@ typedef struct QemuOpts QemuOpts;
|
||||
typedef struct QemuOptsList QemuOptsList;
|
||||
typedef struct QEMUSGList QEMUSGList;
|
||||
typedef struct QEMUSizedBuffer QEMUSizedBuffer;
|
||||
typedef struct QEMUTimerListGroup QEMUTimerListGroup;
|
||||
typedef struct QEMUTimer QEMUTimer;
|
||||
typedef struct Range Range;
|
||||
typedef struct QEMUTimerListGroup QEMUTimerListGroup;
|
||||
typedef struct RAMBlock RAMBlock;
|
||||
typedef struct Range Range;
|
||||
typedef struct SerialState SerialState;
|
||||
typedef struct SHPCDevice SHPCDevice;
|
||||
typedef struct SMBusDevice SMBusDevice;
|
||||
@ -89,6 +89,5 @@ typedef struct SSIBus SSIBus;
|
||||
typedef struct uWireSlave uWireSlave;
|
||||
typedef struct VirtIODevice VirtIODevice;
|
||||
typedef struct Visitor Visitor;
|
||||
typedef struct MonitorDef MonitorDef;
|
||||
|
||||
#endif /* QEMU_TYPEDEFS_H */
|
||||
|
@ -29,7 +29,7 @@ bool id_wellformed(const char *id)
|
||||
|
||||
#define ID_SPECIAL_CHAR '#'
|
||||
|
||||
static const char *const id_subsys_str[] = {
|
||||
static const char *const id_subsys_str[ID_MAX] = {
|
||||
[ID_QDEV] = "qdev",
|
||||
[ID_BLOCK] = "block",
|
||||
};
|
||||
@ -53,7 +53,7 @@ char *id_generate(IdSubSystems id)
|
||||
static uint64_t id_counters[ID_MAX];
|
||||
uint32_t rnd;
|
||||
|
||||
assert(id < ID_MAX);
|
||||
assert(id < ARRAY_SIZE(id_subsys_str));
|
||||
assert(id_subsys_str[id]);
|
||||
|
||||
rnd = g_random_int_range(0, 100);
|
||||
|
Loading…
Reference in New Issue
Block a user