]> git.alsa-project.org Git - alsa-lib.git/commitdiff
fix various warnings
authorJaroslav Kysela <perex@perex.cz>
Fri, 6 Oct 2006 11:18:34 +0000 (13:18 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 6 Oct 2006 11:18:34 +0000 (13:18 +0200)
See also ALSA bug#1689

include/global.h
src/control/control_ext.c
src/pcm/pcm_direct.c
src/pcm/pcm_hooks.c
src/pcm/pcm_meter.c

index 7b8c176a82298c6481d5d9bc8b0a3f0e18e0990f..4889eae5973825d7d7adddbe0d71a329e17afe83 100644 (file)
@@ -130,7 +130,7 @@ int snd_shm_area_destroy(struct snd_shm_area *area);
 
 int snd_user_file(const char *file, char **result);
 
-#ifndef _POSIC_C_SOURCE
+#ifndef _POSIX_C_SOURCE
 struct timeval {
        time_t          tv_sec;         /* seconds */
        long            tv_usec;        /* microseconds */
index 023701a49793265e85f23e073662d5200b943604..3c51cb7ec635145c19d1ec0d8c3777e799413802 100644 (file)
@@ -142,9 +142,9 @@ static int snd_ctl_ext_elem_info(snd_ctl_t *handle, snd_ctl_elem_info_t *info)
                {
                        int64_t xmin, xmax, xstep;
                        ret = ext->callback->get_integer64_info(ext, key,
-                                                               &xmin,
-                                                               &xmax,
-                                                               &xstep);
+                                                               (int64_t *)&xmin,
+                                                               (int64_t *)&xmax,
+                                                               (int64_t *)&xstep);
                        info->value.integer64.min = xmin;
                        info->value.integer64.max = xmax;
                        info->value.integer64.step = xstep;
@@ -265,7 +265,7 @@ static int snd_ctl_ext_elem_write(snd_ctl_t *handle, snd_ctl_elem_value_t *contr
        case SND_CTL_ELEM_TYPE_INTEGER64:
                if (! ext->callback->write_integer64)
                        goto err;
-               ret = ext->callback->write_integer64(ext, key, control->value.integer64.value);
+               ret = ext->callback->write_integer64(ext, key, (int64_t *)control->value.integer64.value);
                break;
        case SND_CTL_ELEM_TYPE_ENUMERATED:
                if (! ext->callback->write_enumerated)
index 057509512370aa564aae52ccdd94e6556a822b50..93ff2a98deb4488037f2cac09f23b01bd1a06fe4 100644 (file)
@@ -1236,7 +1236,9 @@ int snd_pcm_direct_open_secondary_client(snd_pcm_t **spcmp, snd_pcm_direct_t *dm
 /*
  * open a slave PCM as secondary client (dup'ed fd)
  */
-int snd_pcm_direct_initialize_secondary_slave(snd_pcm_direct_t *dmix, snd_pcm_t *spcm, struct slave_params *params)
+int snd_pcm_direct_initialize_secondary_slave(snd_pcm_direct_t *dmix,
+                                             snd_pcm_t *spcm,
+                                             struct slave_params *params ATTRIBUTE_UNUSED)
 {
        int ret;
 
index ef44c02b63377828f180fda4ca1d0fbd645d85c3..860fccf482124d9810eb680d613f7d5ed41f3c7e 100644 (file)
@@ -308,7 +308,7 @@ static int snd_pcm_hook_add_conf(snd_pcm_t *pcm, snd_config_t *root, snd_config_
        snd_config_t *type = NULL, *args = NULL;
        snd_config_iterator_t i, next;
        int (*install_func)(snd_pcm_t *pcm, snd_config_t *args) = NULL;
-       void *h;
+       void *h = NULL;
        if (snd_config_get_type(conf) != SND_CONFIG_TYPE_COMPOUND) {
                SNDERR("Invalid hook definition");
                return -EINVAL;
index 636766648dbde1cf06604025cba0f9ee70e40284..85ac7f84fd7b4d06761d9d8e75fc1170d9b46316 100644 (file)
@@ -603,7 +603,7 @@ static int snd_pcm_meter_add_scope_conf(snd_pcm_t *pcm, const char *name,
        int (*open_func)(snd_pcm_t *, const char *,
                         snd_config_t *, snd_config_t *) = NULL;
        snd_pcm_meter_t *meter = pcm->private_data;
-       void *h;
+       void *h = NULL;
        int err;
 
        if (snd_config_get_type(conf) != SND_CONFIG_TYPE_COMPOUND) {