]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Make seq, rawmidi and control operation structures static const.
authorDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
Fri, 21 Nov 2008 19:26:12 +0000 (20:26 +0100)
committerDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
Fri, 21 Nov 2008 19:28:38 +0000 (20:28 +0100)
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>
src/control/control_hw.c
src/control/control_local.h
src/control/control_shm.c
src/rawmidi/rawmidi_hw.c
src/rawmidi/rawmidi_local.h
src/rawmidi/rawmidi_virt.c
src/seq/seq_hw.c
src/seq/seq_local.h

index aeb2c23eb22c8aff575c98573f5c85d3fd8b6666..e9a6be274e03c07d0c65686fd86aa799c1813123 100644 (file)
@@ -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,
index f72f20021e0c10a5ac08ac7c79346abe4dfddddd..fd9f941804b4dae9501c2233131c5447d25b457a 100644 (file)
@@ -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;
index fbb123666c41f6fa529866ae1c6b5fdc21eb7bec..abab39831f61dd15df403c163b13dc9fe6e9caed 100644 (file)
@@ -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,
index 1f08240df8c8d1a6accd6a386bf08e09bd432e1f..87829fd710eb1b530f6dd28d47ea14be1433e4f8 100644 (file)
@@ -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,
index 4918c25d67adfaf50545338bce91a2f9e746e1e3..3388502cece0eb885f496c89a7f4ae110662cf78 100644 (file)
@@ -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;
index a221f986a6c753b7562d655c9d3bbec7a34ab847..52b89849baf68ed19d1706e672c178cc2329904f 100644 (file)
@@ -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,
index d0a7b87dd3a6e4fe96c1d559049504bf631891c5..0e945932b223fcd0854e45f672a1f2be2b0b71eb 100644 (file)
@@ -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,
index fa3d95c387dac063166081e4fc58cfa7126d4ecd..f0a0acd1b5480d0eec0b5b5b1dd95efa7c759f1b 100644 (file)
@@ -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 */