mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pipewire: module-rtp: fix compilation with UBSan
The type of `0xffff` is `int`, and UBSan does not like when that value is shifted left by 16 bits, which causes e.g. case APPLE_MIDI_CMD_IN: to not compile with the following error: error: case label does not reduce to an integer constant One could use `0xffffu` to force the type to be `unsigned int`, or simply use `0xffff0000` which has no shifts. This patch does the latter.
This commit is contained in:
parent
57cd5611d1
commit
82e30d46a9
1 changed files with 5 additions and 5 deletions
|
|
@ -32,11 +32,11 @@ struct rtp_apple_midi_ck {
|
||||||
uint32_t ts3_l;
|
uint32_t ts3_l;
|
||||||
} __attribute__ ((packed));
|
} __attribute__ ((packed));
|
||||||
|
|
||||||
#define APPLE_MIDI_CMD_IN ((0xffff << 16) | 'I'<<8 | 'N')
|
#define APPLE_MIDI_CMD_IN (0xffff0000 | 'I'<<8 | 'N')
|
||||||
#define APPLE_MIDI_CMD_NO ((0xffff << 16) | 'N'<<8 | 'O')
|
#define APPLE_MIDI_CMD_NO (0xffff0000 | 'N'<<8 | 'O')
|
||||||
#define APPLE_MIDI_CMD_OK ((0xffff << 16) | 'O'<<8 | 'K')
|
#define APPLE_MIDI_CMD_OK (0xffff0000 | 'O'<<8 | 'K')
|
||||||
#define APPLE_MIDI_CMD_CK ((0xffff << 16) | 'C'<<8 | 'K')
|
#define APPLE_MIDI_CMD_CK (0xffff0000 | 'C'<<8 | 'K')
|
||||||
#define APPLE_MIDI_CMD_BY ((0xffff << 16) | 'B'<<8 | 'Y')
|
#define APPLE_MIDI_CMD_BY (0xffff0000 | 'B'<<8 | 'Y')
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue