From e381dd9e4d6e4f518af49e244ad03ed093200938 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 12 Aug 2007 23:24:05 +0000 Subject: [PATCH] 64 bit fixes and minor gcc shut ups git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1656 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/pulsecore/asyncmsgq.c | 2 +- src/pulsecore/asyncmsgq.h | 2 +- src/pulsecore/asyncq.h | 2 +- src/pulsecore/authkey.c | 2 +- src/pulsecore/core-scache.c | 5 ++--- src/pulsecore/core-util.c | 2 +- src/pulsecore/memblock.c | 2 +- src/pulsecore/sink.c | 4 ++-- 8 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/pulsecore/asyncmsgq.c b/src/pulsecore/asyncmsgq.c index 1bef8bd..cc57d3a 100644 --- a/src/pulsecore/asyncmsgq.c +++ b/src/pulsecore/asyncmsgq.c @@ -191,7 +191,7 @@ int pa_asyncmsgq_get(pa_asyncmsgq *a, pa_msgobject **object, int *code, void **u if (chunk) *chunk = a->current->memchunk; - pa_log_debug("Get q=%p object=%p (%s) code=%i data=%p chunk.length=%u", (void*) a, (void*) a->current->object, a->current->object ? a->current->object->parent.type_name : NULL, a->current->code, (void*) a->current->userdata, a->current->memchunk.length); + pa_log_debug("Get q=%p object=%p (%s) code=%i data=%p chunk.length=%lu", (void*) a, (void*) a->current->object, a->current->object ? a->current->object->parent.type_name : NULL, a->current->code, (void*) a->current->userdata, (unsigned long) a->current->memchunk.length); return 0; } diff --git a/src/pulsecore/asyncmsgq.h b/src/pulsecore/asyncmsgq.h index 2f18837..55812c6 100644 --- a/src/pulsecore/asyncmsgq.h +++ b/src/pulsecore/asyncmsgq.h @@ -54,7 +54,7 @@ enum { typedef struct pa_asyncmsgq pa_asyncmsgq; -pa_asyncmsgq* pa_asyncmsgq_new(size_t size); +pa_asyncmsgq* pa_asyncmsgq_new(unsigned size); pa_asyncmsgq* pa_asyncmsgq_ref(pa_asyncmsgq *q); void pa_asyncmsgq_unref(pa_asyncmsgq* q); diff --git a/src/pulsecore/asyncq.h b/src/pulsecore/asyncq.h index 729ec46..53d4586 100644 --- a/src/pulsecore/asyncq.h +++ b/src/pulsecore/asyncq.h @@ -43,7 +43,7 @@ typedef struct pa_asyncq pa_asyncq; -pa_asyncq* pa_asyncq_new(size_t size); +pa_asyncq* pa_asyncq_new(unsigned size); void pa_asyncq_free(pa_asyncq* q, pa_free_cb_t free_cb); void* pa_asyncq_pop(pa_asyncq *q, int wait); diff --git a/src/pulsecore/authkey.c b/src/pulsecore/authkey.c index 1476482..d805624 100644 --- a/src/pulsecore/authkey.c +++ b/src/pulsecore/authkey.c @@ -57,7 +57,7 @@ static int generate(int fd, void *ret_data, size_t length) { pa_random(ret_data, length); lseek(fd, 0, SEEK_SET); - ftruncate(fd, 0); + (void) ftruncate(fd, 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)); diff --git a/src/pulsecore/core-scache.c b/src/pulsecore/core-scache.c index 8a7ba13..6176dcb 100644 --- a/src/pulsecore/core-scache.c +++ b/src/pulsecore/core-scache.c @@ -164,8 +164,8 @@ int pa_scache_add_item(pa_core *c, const char *name, const pa_sample_spec *ss, c if (idx) *idx = e->index; - pa_log_debug("created sample \"%s\" (#%d), %d bytes with sample spec %s", - name, e->index, e->memchunk.length, + pa_log_debug("created sample \"%s\" (#%d), %lu bytes with sample spec %s", + name, e->index, (unsigned long) e->memchunk.length, pa_sample_spec_snprint(st, sizeof(st), &e->sample_spec)); return 0; @@ -316,7 +316,6 @@ int pa_scache_play_item_by_name(pa_core *c, const char *name, const char*sink_na return pa_scache_play_item(c, name, sink, volume); } - const char * pa_scache_get_name_by_id(pa_core *c, uint32_t id) { pa_scache_entry *e; assert(c && id != PA_IDXSET_INVALID); diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index e61be70..165fcf3 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -169,7 +169,7 @@ int pa_make_secure_dir(const char* dir, mode_t m, uid_t uid, gid_t gid) { uid = getuid(); if (gid == (gid_t)-1) gid = getgid(); - chown(dir, uid, gid); + (void) chown(dir, uid, gid); #endif #ifdef HAVE_CHMOD diff --git a/src/pulsecore/memblock.c b/src/pulsecore/memblock.c index f0e2b4c..da99609 100644 --- a/src/pulsecore/memblock.c +++ b/src/pulsecore/memblock.c @@ -311,7 +311,7 @@ pa_memblock *pa_memblock_new_pool(pa_mempool *p, size_t length) { pa_atomic_ptr_store(&b->data, mempool_slot_data(slot)); } else { - pa_log_debug("Memory block too large for pool: %u > %u", length, p->block_size - sizeof(struct mempool_slot)); + pa_log_debug("Memory block too large for pool: %lu > %lu", (unsigned long) length, (unsigned long) (p->block_size - sizeof(struct mempool_slot))); pa_atomic_inc(&p->stat.n_too_large_for_pool); return NULL; } diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index df08ff6..ced8038 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -738,7 +738,7 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse volume_is_norm = pa_cvolume_is_norm(&info->sink_input->thread_info.volume); - pa_log_debug("Buffering %u bytes ...", info->buffer_bytes); + pa_log_debug("Buffering l%u bytes ...", (unsigned long) info->buffer_bytes); while (info->buffer_bytes > 0) { pa_memchunk memchunk; @@ -772,7 +772,7 @@ int pa_sink_process_msg(pa_msgobject *o, int code, void *userdata, int64_t offse pa_memblockq_sink_input_set_queue(info->ghost_sink_input, info->buffer); - pa_log_debug("Buffered %u bytes ...", pa_memblockq_get_length(info->buffer)); + pa_log_debug("Buffered %lu bytes ...", (unsigned long) pa_memblockq_get_length(info->buffer)); } /* Let's remove the sink input ...*/ -- 2.7.4