mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
fix a few compiler warnings on older gcc
This commit is contained in:
parent
506eacc922
commit
13018d62c1
10 changed files with 19 additions and 19 deletions
|
|
@ -42,7 +42,7 @@
|
|||
#error "Please include config.h before including this file!"
|
||||
#endif
|
||||
|
||||
#if HAVE_ATOMIC_BUILTINS
|
||||
#ifdef HAVE_ATOMIC_BUILTINS
|
||||
|
||||
/* __sync based implementation */
|
||||
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ static int generate(int fd, void *ret_data, size_t length) {
|
|||
|
||||
pa_random(ret_data, length);
|
||||
|
||||
lseek(fd, 0, SEEK_SET);
|
||||
(void) ftruncate(fd, 0);
|
||||
lseek(fd, (off_t) 0, SEEK_SET);
|
||||
(void) ftruncate(fd, (off_t) 0);
|
||||
|
||||
if ((r = pa_loop_write(fd, ret_data, length, NULL)) < 0 || (size_t) r != length) {
|
||||
pa_log("Failed to write cookie file: %s", pa_cstrerror(errno));
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ void pa_memblockq_set_maxlength(pa_memblockq *memblockq, size_t maxlength); /* m
|
|||
void pa_memblockq_set_tlength(pa_memblockq *memblockq, size_t tlength); /* might modify minreq, too */
|
||||
void pa_memblockq_set_prebuf(pa_memblockq *memblockq, size_t prebuf); /* might modify minreq, too */
|
||||
void pa_memblockq_set_minreq(pa_memblockq *memblockq, size_t minreq);
|
||||
void pa_memblockq_set_maxrewind(pa_memblockq *memblockq, size_t rewind); /* Set the maximum history size */
|
||||
void pa_memblockq_set_maxrewind(pa_memblockq *memblockq, size_t maxrewind); /* Set the maximum history size */
|
||||
void pa_memblockq_set_silence(pa_memblockq *memblockq, pa_memchunk *silence);
|
||||
|
||||
/* Call pa_memchunk_willneed() for every chunk in the queue from the current read pointer to the end */
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ int pa_shm_create_rw(pa_shm *m, size_t size, pa_bool_t shared, mode_t mode) {
|
|||
m->size = size;
|
||||
|
||||
#ifdef MAP_ANONYMOUS
|
||||
if ((m->ptr = mmap(NULL, m->size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0)) == MAP_FAILED) {
|
||||
if ((m->ptr = mmap(NULL, m->size, PROT_READ|PROT_WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, (off_t) 0)) == MAP_FAILED) {
|
||||
pa_log("mmap() failed: %s", pa_cstrerror(errno));
|
||||
goto fail;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -437,7 +437,7 @@ static void start_timeout(pa_socket_client *c) {
|
|||
pa_assert(!c->timeout_event);
|
||||
|
||||
pa_gettimeofday(&tv);
|
||||
pa_timeval_add(&tv, CONNECT_TIMEOUT * 1000000);
|
||||
pa_timeval_add(&tv, CONNECT_TIMEOUT * PA_USEC_PER_SEC);
|
||||
c->timeout_event = c->mainloop->time_new(c->mainloop, &tv, timeout_cb, c);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue