mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Make seq, rawmidi and control operation structures static const.
Since they are never changed it does not make sense to have them in the writeable .data section, just make sure to add const to the ops member in the structure definitions so that there are no extra warnings added. Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
This commit is contained in:
parent
8ed98db259
commit
2289326673
8 changed files with 8 additions and 8 deletions
|
|
@ -332,7 +332,7 @@ static int snd_ctl_hw_read(snd_ctl_t *handle, snd_ctl_event_t *event)
|
|||
return 1;
|
||||
}
|
||||
|
||||
snd_ctl_ops_t snd_ctl_hw_ops = {
|
||||
static const snd_ctl_ops_t snd_ctl_hw_ops = {
|
||||
.close = snd_ctl_hw_close,
|
||||
.nonblock = snd_ctl_hw_nonblock,
|
||||
.async = snd_ctl_hw_async,
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ struct _snd_ctl {
|
|||
void *dl_handle;
|
||||
char *name;
|
||||
snd_ctl_type_t type;
|
||||
snd_ctl_ops_t *ops;
|
||||
const snd_ctl_ops_t *ops;
|
||||
void *private_data;
|
||||
int nonblock;
|
||||
int poll_fd;
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ static int snd_ctl_shm_read(snd_ctl_t *ctl, snd_ctl_event_t *event)
|
|||
return err;
|
||||
}
|
||||
|
||||
snd_ctl_ops_t snd_ctl_shm_ops = {
|
||||
static const snd_ctl_ops_t snd_ctl_shm_ops = {
|
||||
.close = snd_ctl_shm_close,
|
||||
.nonblock = snd_ctl_shm_nonblock,
|
||||
.async = snd_ctl_shm_async,
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ static ssize_t snd_rawmidi_hw_read(snd_rawmidi_t *rmidi, void *buffer, size_t si
|
|||
return result;
|
||||
}
|
||||
|
||||
snd_rawmidi_ops_t snd_rawmidi_hw_ops = {
|
||||
static const snd_rawmidi_ops_t snd_rawmidi_hw_ops = {
|
||||
.close = snd_rawmidi_hw_close,
|
||||
.nonblock = snd_rawmidi_hw_nonblock,
|
||||
.info = snd_rawmidi_hw_info,
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ struct _snd_rawmidi {
|
|||
snd_rawmidi_stream_t stream;
|
||||
int mode;
|
||||
int poll_fd;
|
||||
snd_rawmidi_ops_t *ops;
|
||||
const snd_rawmidi_ops_t *ops;
|
||||
void *private_data;
|
||||
size_t buffer_size;
|
||||
size_t avail_min;
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ static ssize_t snd_rawmidi_virtual_read(snd_rawmidi_t *rmidi, void *buffer, size
|
|||
return result;
|
||||
}
|
||||
|
||||
snd_rawmidi_ops_t snd_rawmidi_virtual_ops = {
|
||||
static const snd_rawmidi_ops_t snd_rawmidi_virtual_ops = {
|
||||
.close = snd_rawmidi_virtual_close,
|
||||
.nonblock = snd_rawmidi_virtual_nonblock,
|
||||
.info = snd_rawmidi_virtual_info,
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ static int snd_seq_hw_query_next_port(snd_seq_t *seq, snd_seq_port_info_t *info)
|
|||
return 0;
|
||||
}
|
||||
|
||||
snd_seq_ops_t snd_seq_hw_ops = {
|
||||
static const snd_seq_ops_t snd_seq_hw_ops = {
|
||||
.close = snd_seq_hw_close,
|
||||
.nonblock = snd_seq_hw_nonblock,
|
||||
.system_info = snd_seq_hw_system_info,
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ struct _snd_seq {
|
|||
int mode;
|
||||
int poll_fd;
|
||||
void *dl_handle;
|
||||
snd_seq_ops_t *ops;
|
||||
const snd_seq_ops_t *ops;
|
||||
void *private_data;
|
||||
int client; /* client number */
|
||||
/* buffers */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue