diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-08-30 01:22:41 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-08-30 01:22:41 +0200 |
commit | 34bcba63a2eded49853b29844e65328502a3cb0d (patch) | |
tree | 3c0fbb3ee3554c606397c0919125a6ee17b579c7 | |
parent | 13018d62c10731459b0b4fd3f6852dcebddbccb8 (diff) |
remove a few more gcc warnings
-rw-r--r-- | src/pulsecore/module.c | 4 | ||||
-rw-r--r-- | src/pulsecore/object.h | 2 | ||||
-rw-r--r-- | src/pulsecore/pid.c | 4 | ||||
-rw-r--r-- | src/pulsecore/resampler.c | 2 | ||||
-rw-r--r-- | src/pulsecore/shm.c | 4 | ||||
-rw-r--r-- | src/pulsecore/sound-file.c | 4 |
6 files changed, 10 insertions, 10 deletions
diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c index 29003af8..9b17cb91 100644 --- a/src/pulsecore/module.c +++ b/src/pulsecore/module.c @@ -59,7 +59,7 @@ static void timeout_callback(pa_mainloop_api *m, pa_time_event*e, const struct t pa_module_unload_unused(c); pa_gettimeofday(&ntv); - pa_timeval_add(&ntv, UNLOAD_POLL_TIME*1000000); + pa_timeval_add(&ntv, UNLOAD_POLL_TIME*PA_USEC_PER_SEC); m->time_restart(e, &ntv); } @@ -124,7 +124,7 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) { if (m->auto_unload && !c->module_auto_unload_event) { struct timeval ntv; pa_gettimeofday(&ntv); - pa_timeval_add(&ntv, UNLOAD_POLL_TIME*1000000); + pa_timeval_add(&ntv, UNLOAD_POLL_TIME*PA_USEC_PER_SEC); c->module_auto_unload_event = c->mainloop->time_new(c->mainloop, &ntv, timeout_callback, c); } diff --git a/src/pulsecore/object.h b/src/pulsecore/object.h index 7dcfa2eb..2ee4fc31 100644 --- a/src/pulsecore/object.h +++ b/src/pulsecore/object.h @@ -42,7 +42,7 @@ struct pa_object { pa_object *pa_object_new_internal(size_t size, const char *type_name, int (*check_type)(const char *type_name)); #define pa_object_new(type) ((type*) pa_object_new_internal(sizeof(type), #type, type##_check_type) -#define pa_object_free ((void (*) (pa_object* o)) pa_xfree) +#define pa_object_free ((void (*) (pa_object* _obj)) pa_xfree) int pa_object_check_type(const char *type); diff --git a/src/pulsecore/pid.c b/src/pulsecore/pid.c index 1c0851ba..ce8ef19b 100644 --- a/src/pulsecore/pid.c +++ b/src/pulsecore/pid.c @@ -235,7 +235,7 @@ int pa_pid_file_create(const char *procname) { } /* Overwrite the current PID file */ - if (lseek(fd, 0, SEEK_SET) == (off_t) -1 || ftruncate(fd, 0) < 0) { + if (lseek(fd, (off_t) 0, SEEK_SET) == (off_t) -1 || ftruncate(fd, (off_t) 0) < 0) { pa_log("Failed to truncate PID file '%s': %s", fn, pa_cstrerror(errno)); goto fail; } @@ -288,7 +288,7 @@ int pa_pid_file_remove(void) { goto fail; } - if (ftruncate(fd, 0) < 0) { + if (ftruncate(fd, (off_t) 0) < 0) { pa_log_warn("Failed to truncate PID file '%s': %s", fn, pa_cstrerror(errno)); goto fail; } diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c index b20fc61f..45cd68c1 100644 --- a/src/pulsecore/resampler.c +++ b/src/pulsecore/resampler.c @@ -1047,7 +1047,7 @@ static pa_memchunk *remap_channels(pa_resampler *r, pa_memchunk *input) { (int16_t*) dst + oc, o_skip, (int16_t*) src + ic, i_skip, (int) n_frames, - 1.0, r->map_table[oc][ic]); + 1.0f, r->map_table[oc][ic]); } } diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c index 05b06798..b2997575 100644 --- a/src/pulsecore/shm.c +++ b/src/pulsecore/shm.c @@ -143,7 +143,7 @@ int pa_shm_create_rw(pa_shm *m, size_t size, pa_bool_t shared, mode_t mode) { goto fail; } - if ((m->ptr = mmap(NULL, m->size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0)) == MAP_FAILED) { + if ((m->ptr = mmap(NULL, m->size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, (off_t) 0)) == MAP_FAILED) { pa_log("mmap() failed: %s", pa_cstrerror(errno)); goto fail; } @@ -291,7 +291,7 @@ int pa_shm_attach_ro(pa_shm *m, unsigned id) { m->size = (size_t) st.st_size; - if ((m->ptr = mmap(NULL, m->size, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED) { + if ((m->ptr = mmap(NULL, m->size, PROT_READ, MAP_SHARED, fd, (off_t) 0)) == MAP_FAILED) { pa_log("mmap() failed: %s", pa_cstrerror(errno)); goto fail; } diff --git a/src/pulsecore/sound-file.c b/src/pulsecore/sound-file.c index 74338f9a..380cef16 100644 --- a/src/pulsecore/sound-file.c +++ b/src/pulsecore/sound-file.c @@ -89,7 +89,7 @@ int pa_sound_file_load( case SF_FORMAT_PCM_U8: case SF_FORMAT_PCM_S8: ss->format = PA_SAMPLE_S16NE; - readf_function = (sf_count_t (*)(SNDFILE *sndfile, void *ptr, sf_count_t frames)) sf_readf_short; + readf_function = (sf_count_t (*)(SNDFILE *sndfile, void *_ptr, sf_count_t frames)) sf_readf_short; break; case SF_FORMAT_ULAW: @@ -104,7 +104,7 @@ int pa_sound_file_load( case SF_FORMAT_DOUBLE: default: ss->format = PA_SAMPLE_FLOAT32NE; - readf_function = (sf_count_t (*)(SNDFILE *sndfile, void *ptr, sf_count_t frames)) sf_readf_float; + readf_function = (sf_count_t (*)(SNDFILE *sndfile, void *_ptr, sf_count_t frames)) sf_readf_float; break; } |