mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
remove a few more gcc warnings
This commit is contained in:
parent
13018d62c1
commit
34bcba63a2
6 changed files with 10 additions and 10 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue