Remove any warnings about incorrect type to setsockopt() (char* vs void*).

git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/ossman@375 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Pierre Ossman 2006-01-05 18:20:14 +00:00
parent 7dcf4e4596
commit dbad54a20b
3 changed files with 10 additions and 10 deletions

View file

@ -120,7 +120,7 @@ static void do_call(struct pa_socket_client *c) {
goto finish; goto finish;
lerror = sizeof(error); lerror = sizeof(error);
if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, &error, &lerror) < 0) { if (getsockopt(c->fd, SOL_SOCKET, SO_ERROR, (void*)&error, &lerror) < 0) {
pa_log(__FILE__": getsockopt(): %s\n", strerror(errno)); pa_log(__FILE__": getsockopt(): %s\n", strerror(errno));
goto finish; goto finish;
} }

View file

@ -197,7 +197,7 @@ struct pa_socket_server* pa_socket_server_new_ipv4(struct pa_mainloop_api *m, ui
pa_fd_set_cloexec(fd, 1); pa_fd_set_cloexec(fd, 1);
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0) if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (void*)&on, sizeof(on)) < 0)
pa_log(__FILE__": setsockopt(): %s\n", strerror(errno)); pa_log(__FILE__": setsockopt(): %s\n", strerror(errno));
pa_socket_tcp_low_delay(fd); pa_socket_tcp_low_delay(fd);
@ -246,7 +246,7 @@ struct pa_socket_server* pa_socket_server_new_ipv6(struct pa_mainloop_api *m, ui
pa_fd_set_cloexec(fd, 1); pa_fd_set_cloexec(fd, 1);
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0) if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (void*)&on, sizeof(on)) < 0)
pa_log(__FILE__": setsockopt(): %s\n", strerror(errno)); pa_log(__FILE__": setsockopt(): %s\n", strerror(errno));
pa_socket_tcp_low_delay(fd); pa_socket_tcp_low_delay(fd);

View file

@ -99,7 +99,7 @@ int pa_socket_low_delay(int fd) {
#ifdef SO_PRIORITY #ifdef SO_PRIORITY
priority = 7; priority = 7;
if (setsockopt(fd, SOL_SOCKET, SO_PRIORITY, &priority, sizeof(priority)) < 0) if (setsockopt(fd, SOL_SOCKET, SO_PRIORITY, (void*)&priority, sizeof(priority)) < 0)
return -1; return -1;
#endif #endif
@ -117,9 +117,9 @@ int pa_socket_tcp_low_delay(int fd) {
#if defined(SOL_TCP) || defined(IPPROTO_TCP) #if defined(SOL_TCP) || defined(IPPROTO_TCP)
#if defined(SOL_TCP) #if defined(SOL_TCP)
if (setsockopt(fd, SOL_TCP, TCP_NODELAY, &on, sizeof(on)) < 0) if (setsockopt(fd, SOL_TCP, TCP_NODELAY, (void*)&on, sizeof(on)) < 0)
#else #else
if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) < 0) if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (void*)&on, sizeof(on)) < 0)
#endif #endif
ret = -1; ret = -1;
#endif #endif
@ -128,9 +128,9 @@ int pa_socket_tcp_low_delay(int fd) {
defined(IPPROTO_IP)) defined(IPPROTO_IP))
tos = IPTOS_LOWDELAY; tos = IPTOS_LOWDELAY;
#ifdef SOL_IP #ifdef SOL_IP
if (setsockopt(fd, SOL_IP, IP_TOS, &tos, sizeof(tos)) < 0) if (setsockopt(fd, SOL_IP, IP_TOS, (void*)&tos, sizeof(tos)) < 0)
#else #else
if (setsockopt(fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos)) < 0) if (setsockopt(fd, IPPROTO_IP, IP_TOS, (void*)&tos, sizeof(tos)) < 0)
#endif #endif
ret = -1; ret = -1;
#endif #endif
@ -142,7 +142,7 @@ int pa_socket_tcp_low_delay(int fd) {
int pa_socket_set_rcvbuf(int fd, size_t l) { int pa_socket_set_rcvbuf(int fd, size_t l) {
assert(fd >= 0); assert(fd >= 0);
/* if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &l, sizeof(l)) < 0) { */ /* if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (void*)&l, sizeof(l)) < 0) { */
/* pa_log(__FILE__": SO_RCVBUF: %s\n", strerror(errno)); */ /* pa_log(__FILE__": SO_RCVBUF: %s\n", strerror(errno)); */
/* return -1; */ /* return -1; */
/* } */ /* } */
@ -153,7 +153,7 @@ int pa_socket_set_rcvbuf(int fd, size_t l) {
int pa_socket_set_sndbuf(int fd, size_t l) { int pa_socket_set_sndbuf(int fd, size_t l) {
assert(fd >= 0); assert(fd >= 0);
/* if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &l, sizeof(l)) < 0) { */ /* if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (void*)&l, sizeof(l)) < 0) { */
/* pa_log(__FILE__": SO_SNDBUF: %s\n", strerror(errno)); */ /* pa_log(__FILE__": SO_SNDBUF: %s\n", strerror(errno)); */
/* return -1; */ /* return -1; */
/* } */ /* } */