summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-11-21 20:26:12 +0100
committerDiego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-11-21 20:28:38 +0100
commit228932667366b627fb86733741eafa5df775fa47 (patch)
tree58cfcc86af283d559b7ca5921a3a0e21f1eacb53
parent8ed98db2590e284dd7ca884135c91566fee6069c (diff)
downloadalsa-lib-228932667366b627fb86733741eafa5df775fa47.tar.gz
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>
-rw-r--r--src/control/control_hw.c2
-rw-r--r--src/control/control_local.h2
-rw-r--r--src/control/control_shm.c2
-rw-r--r--src/rawmidi/rawmidi_hw.c2
-rw-r--r--src/rawmidi/rawmidi_local.h2
-rw-r--r--src/rawmidi/rawmidi_virt.c2
-rw-r--r--src/seq/seq_hw.c2
-rw-r--r--src/seq/seq_local.h2
8 files changed, 8 insertions, 8 deletions
diff --git a/src/control/control_hw.c b/src/control/control_hw.c
index aeb2c23e..e9a6be27 100644
--- a/src/control/control_hw.c
+++ b/src/control/control_hw.c
@@ -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,
diff --git a/src/control/control_local.h b/src/control/control_local.h
index f72f2002..fd9f9418 100644
--- a/src/control/control_local.h
+++ b/src/control/control_local.h
@@ -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;
diff --git a/src/control/control_shm.c b/src/control/control_shm.c
index fbb12366..abab3983 100644
--- a/src/control/control_shm.c
+++ b/src/control/control_shm.c
@@ -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,
diff --git a/src/rawmidi/rawmidi_hw.c b/src/rawmidi/rawmidi_hw.c
index 1f08240d..87829fd7 100644
--- a/src/rawmidi/rawmidi_hw.c
+++ b/src/rawmidi/rawmidi_hw.c
@@ -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,
diff --git a/src/rawmidi/rawmidi_local.h b/src/rawmidi/rawmidi_local.h
index 4918c25d..3388502c 100644
--- a/src/rawmidi/rawmidi_local.h
+++ b/src/rawmidi/rawmidi_local.h
@@ -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;
diff --git a/src/rawmidi/rawmidi_virt.c b/src/rawmidi/rawmidi_virt.c
index a221f986..52b89849 100644
--- a/src/rawmidi/rawmidi_virt.c
+++ b/src/rawmidi/rawmidi_virt.c
@@ -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,
diff --git a/src/seq/seq_hw.c b/src/seq/seq_hw.c
index d0a7b87d..0e945932 100644
--- a/src/seq/seq_hw.c
+++ b/src/seq/seq_hw.c
@@ -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,
diff --git a/src/seq/seq_local.h b/src/seq/seq_local.h
index fa3d95c3..f0a0acd1 100644
--- a/src/seq/seq_local.h
+++ b/src/seq/seq_local.h
@@ -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 */