summaryrefslogtreecommitdiffstats
path: root/polyp/socket-util.c
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-01-05 18:20:14 +0000
committerPierre Ossman <ossman@cendio.se>2006-01-05 18:20:14 +0000
commitdbad54a20bf323d35176b1faba4fdd4b425f9ad9 (patch)
tree632968df2ed77d7cba1f87a4dbf9b3568d781d12 /polyp/socket-util.c
parent7dcf4e45963b2aff840ea53bde4012e3c6cac9f8 (diff)
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
Diffstat (limited to 'polyp/socket-util.c')
-rw-r--r--polyp/socket-util.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/polyp/socket-util.c b/polyp/socket-util.c
index 495ee1b0..7b32f4ee 100644
--- a/polyp/socket-util.c
+++ b/polyp/socket-util.c
@@ -99,7 +99,7 @@ int pa_socket_low_delay(int fd) {
#ifdef SO_PRIORITY
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;
#endif
@@ -117,9 +117,9 @@ int pa_socket_tcp_low_delay(int fd) {
#if defined(SOL_TCP) || defined(IPPROTO_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
- if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) < 0)
+ if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (void*)&on, sizeof(on)) < 0)
#endif
ret = -1;
#endif
@@ -128,9 +128,9 @@ int pa_socket_tcp_low_delay(int fd) {
defined(IPPROTO_IP))
tos = IPTOS_LOWDELAY;
#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
- if (setsockopt(fd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos)) < 0)
+ if (setsockopt(fd, IPPROTO_IP, IP_TOS, (void*)&tos, sizeof(tos)) < 0)
#endif
ret = -1;
#endif
@@ -142,7 +142,7 @@ int pa_socket_tcp_low_delay(int fd) {
int pa_socket_set_rcvbuf(int fd, size_t l) {
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)); */
/* 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) {
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)); */
/* return -1; */
/* } */