mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	fix a couple of issues I found when compiling polypaudio with gcc 2.95
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@754 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
		
							parent
							
								
									60008cb115
								
							
						
					
					
						commit
						746adcfed5
					
				
					 13 changed files with 15 additions and 13 deletions
				
			
		| 
						 | 
					@ -51,7 +51,7 @@ struct pa_alsa_fdlist {
 | 
				
			||||||
    void *userdata;
 | 
					    void *userdata;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void io_cb(pa_mainloop_api*a, pa_io_event* e, int fd, pa_io_event_flags_t events, void *userdata) {
 | 
					static void io_cb(pa_mainloop_api*a, pa_io_event* e, PA_GCC_UNUSED int fd, pa_io_event_flags_t events, void *userdata) {
 | 
				
			||||||
    struct pa_alsa_fdlist *fdl = (struct pa_alsa_fdlist*)userdata;
 | 
					    struct pa_alsa_fdlist *fdl = (struct pa_alsa_fdlist*)userdata;
 | 
				
			||||||
    int err, i;
 | 
					    int err, i;
 | 
				
			||||||
    unsigned short revents;
 | 
					    unsigned short revents;
 | 
				
			||||||
| 
						 | 
					@ -102,7 +102,7 @@ static void io_cb(pa_mainloop_api*a, pa_io_event* e, int fd, pa_io_event_flags_t
 | 
				
			||||||
    a->defer_enable(fdl->defer, 1);
 | 
					    a->defer_enable(fdl->defer, 1);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void defer_cb(pa_mainloop_api*a, pa_defer_event* e, void *userdata) {
 | 
					static void defer_cb(pa_mainloop_api*a, PA_GCC_UNUSED pa_defer_event* e, void *userdata) {
 | 
				
			||||||
    struct pa_alsa_fdlist *fdl = (struct pa_alsa_fdlist*)userdata;
 | 
					    struct pa_alsa_fdlist *fdl = (struct pa_alsa_fdlist*)userdata;
 | 
				
			||||||
    int num_fds, i, err;
 | 
					    int num_fds, i, err;
 | 
				
			||||||
    struct pollfd *temp;
 | 
					    struct pollfd *temp;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -259,7 +259,7 @@ fail:
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void pa__done(pa_core *c, pa_module*m) {
 | 
					void pa__done(PA_GCC_UNUSED pa_core *c, PA_GCC_UNUSED pa_module*m) {
 | 
				
			||||||
    /* NOP */
 | 
					    /* NOP */
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -112,6 +112,7 @@ static void io_event_cb(pa_mainloop_api *m, pa_io_event *e, int fd, pa_io_event_
 | 
				
			||||||
    char x;
 | 
					    char x;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    assert(m);
 | 
					    assert(m);
 | 
				
			||||||
 | 
					    assert(e);
 | 
				
			||||||
    assert(flags == PA_IO_EVENT_INPUT);
 | 
					    assert(flags == PA_IO_EVENT_INPUT);
 | 
				
			||||||
    assert(u);
 | 
					    assert(u);
 | 
				
			||||||
    assert(u->pipe_fds[0] == fd);
 | 
					    assert(u->pipe_fds[0] == fd);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -461,8 +461,9 @@ int pa__init(pa_core *c, pa_module*m) {
 | 
				
			||||||
     * Without this snippet, poll will never register the fd as ready.
 | 
					     * Without this snippet, poll will never register the fd as ready.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    if (u->source) {
 | 
					    if (u->source) {
 | 
				
			||||||
        char buf[u->sample_size];
 | 
					        char *buf = pa_xnew(char, u->sample_size);
 | 
				
			||||||
        read(u->fd, buf, u->sample_size);
 | 
					        read(u->fd, buf, u->sample_size);
 | 
				
			||||||
 | 
					        pa_xfree(buf);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Read mixer settings */
 | 
					    /* Read mixer settings */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -603,7 +603,7 @@ static void pstream_packet_callback(pa_pstream *p, pa_packet *packet, const void
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifndef TUNNEL_SINK
 | 
					#ifndef TUNNEL_SINK
 | 
				
			||||||
static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t offset, pa_seek_mode_t seek, const pa_memchunk *chunk, void *userdata) {
 | 
					static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, PA_GCC_UNUSED int64_t offset, PA_GCC_UNUSED pa_seek_mode_t seek, const pa_memchunk *chunk, void *userdata) {
 | 
				
			||||||
    struct userdata *u = userdata;
 | 
					    struct userdata *u = userdata;
 | 
				
			||||||
    assert(p && chunk && u);
 | 
					    assert(p && chunk && u);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -477,7 +477,7 @@ fail:
 | 
				
			||||||
    return -1;
 | 
					    return -1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void free_func(void *p, void *userdata) {
 | 
					static void free_func(void *p, PA_GCC_UNUSED void *userdata) {
 | 
				
			||||||
    session_free(p, 0);
 | 
					    session_free(p, 0);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,7 +43,7 @@ struct pa_browser {
 | 
				
			||||||
    pa_io_event *io_event;
 | 
					    pa_io_event *io_event;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void io_callback(pa_mainloop_api*a, pa_io_event*e, int fd, pa_io_event_flags_t events, void *userdata) {
 | 
					static void io_callback(pa_mainloop_api*a, PA_GCC_UNUSED pa_io_event*e, PA_GCC_UNUSED int fd, pa_io_event_flags_t events, void *userdata) {
 | 
				
			||||||
    pa_browser *b = userdata;
 | 
					    pa_browser *b = userdata;
 | 
				
			||||||
    assert(a && b && b->mainloop == a);
 | 
					    assert(a && b && b->mainloop == a);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -955,7 +955,7 @@ const char* pa_context_get_server(pa_context *c) {
 | 
				
			||||||
    return c->server;
 | 
					    return c->server;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
uint32_t pa_context_get_protocol_version(pa_context *c) {
 | 
					uint32_t pa_context_get_protocol_version(PA_GCC_UNUSED pa_context *c) {
 | 
				
			||||||
    return PA_PROTOCOL_VERSION;
 | 
					    return PA_PROTOCOL_VERSION;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -288,7 +288,7 @@ typedef enum pa_seek_mode {
 | 
				
			||||||
    PA_SEEK_RELATIVE = 0,           /**< Seek relatively to the write index */
 | 
					    PA_SEEK_RELATIVE = 0,           /**< Seek relatively to the write index */
 | 
				
			||||||
    PA_SEEK_ABSOLUTE = 1,           /**< Seek relatively to the start of the buffer queue */  
 | 
					    PA_SEEK_ABSOLUTE = 1,           /**< Seek relatively to the start of the buffer queue */  
 | 
				
			||||||
    PA_SEEK_RELATIVE_ON_READ = 2,   /**< Seek relatively to the read index.  */
 | 
					    PA_SEEK_RELATIVE_ON_READ = 2,   /**< Seek relatively to the read index.  */
 | 
				
			||||||
    PA_SEEK_RELATIVE_END = 3,       /**< Seek relatively to the current end of the buffer queue. */
 | 
					    PA_SEEK_RELATIVE_END = 3        /**< Seek relatively to the current end of the buffer queue. */
 | 
				
			||||||
} pa_seek_mode_t;
 | 
					} pa_seek_mode_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Special sink flags. \since 0.8  */
 | 
					/** Special sink flags. \since 0.8  */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -360,7 +360,7 @@ static void invalidate_indexes(pa_stream *s, int r, int w) {
 | 
				
			||||||
    request_auto_timing_update(s, 1);
 | 
					    request_auto_timing_update(s, 1);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void auto_timing_update_callback(pa_mainloop_api *m, pa_time_event *e, PA_GCC_UNUSED const struct timeval *tv, void *userdata) {
 | 
					static void auto_timing_update_callback(PA_GCC_UNUSED pa_mainloop_api *m, PA_GCC_UNUSED pa_time_event *e, PA_GCC_UNUSED const struct timeval *tv, void *userdata) {
 | 
				
			||||||
    pa_stream *s = userdata;
 | 
					    pa_stream *s = userdata;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*     pa_log("time event");    */
 | 
					/*     pa_log("time event");    */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -371,7 +371,7 @@ static void asyncns_cb(pa_mainloop_api*m, pa_io_event *e, int fd, PA_GCC_UNUSED
 | 
				
			||||||
    goto finish;
 | 
					    goto finish;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fail:
 | 
					fail:
 | 
				
			||||||
    errno == EHOSTUNREACH;
 | 
					    errno = EHOSTUNREACH;
 | 
				
			||||||
    do_call(c);
 | 
					    do_call(c);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
finish:
 | 
					finish:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -170,7 +170,7 @@ void pa_source_notify(pa_source*s) {
 | 
				
			||||||
        s->notify(s);
 | 
					        s->notify(s);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int do_post(void *p, PA_GCC_UNUSED uint32_t idx, int *del, void*userdata) {
 | 
					static int do_post(void *p, PA_GCC_UNUSED uint32_t idx, PA_GCC_UNUSED int *del, void*userdata) {
 | 
				
			||||||
    pa_source_output *o = p;
 | 
					    pa_source_output *o = p;
 | 
				
			||||||
    const pa_memchunk *chunk = userdata;
 | 
					    const pa_memchunk *chunk = userdata;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -36,7 +36,7 @@
 | 
				
			||||||
#include <polypcore/log.h>
 | 
					#include <polypcore/log.h>
 | 
				
			||||||
#include <polypcore/pid.h>
 | 
					#include <polypcore/pid.h>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int main(PA_GCC_UNUSED int main, PA_GCC_UNUSED char*argv[]) {
 | 
					int main(PA_GCC_UNUSED int argc, PA_GCC_UNUSED char*argv[]) {
 | 
				
			||||||
    pid_t pid ;
 | 
					    pid_t pid ;
 | 
				
			||||||
    int fd = -1;
 | 
					    int fd = -1;
 | 
				
			||||||
    int ret = 1, i;
 | 
					    int ret = 1, i;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue