From 749a6ec63a8f257c2b54511f1d7a5467ea4c38d9 Mon Sep 17 00:00:00 2001 From: jdl Date: Sun, 20 Oct 2002 16:01:10 +0000 Subject: reduce warnings pass #1 svn path=/trunk/externals/OSCx/; revision=179 --- send+dump/Makefile | 9 +++++---- send+dump/dumpOSC.c | 5 +++-- send+dump/htmsocket.c | 6 +++--- send+dump/sendOSC.c | 6 +++++- 4 files changed, 16 insertions(+), 10 deletions(-) (limited to 'send+dump') diff --git a/send+dump/Makefile b/send+dump/Makefile index 7b14a43..7521258 100644 --- a/send+dump/Makefile +++ b/send+dump/Makefile @@ -1,6 +1,7 @@ LIBOSCDIR = ../libOSC LIBOSC = ${LIBOSCDIR}/libOSC.a -CFLAGS= -O2 -I$(LIBOSCDIR) +CFLAGS= -O2 -I$(LIBOSCDIR) -Wall +DEFS= -Dunix DUMPOBJS=dumpOSC.o @@ -8,13 +9,13 @@ DUMPOBJS=dumpOSC.o both: sendOSC dumpOSC sendOSC: sendOSC.o htmsocket.o ${LIBOSC} - ${CC} -o sendOSC sendOSC.o htmsocket.o ${LIBOSC} + ${CC} ${CFLAGS} ${DEFS} -o sendOSC sendOSC.o htmsocket.o ${LIBOSC} dumpOSC: ${DUMPOBJS} - ${CC} -o $@ ${DUMPOBJS} + ${CC} ${CFLAGS} ${DEFS} -o $@ ${DUMPOBJS} dumpUDP: dumpUDP.o - ${CC} -o dumpUDP dumpUDP.o + ${CC} ${CFLAGS} ${DEFS} -o dumpUDP dumpUDP.o ${LIBOSC}: echo "You need to go to " ${LIBOSCDIR} " and do a make." diff --git a/send+dump/dumpOSC.c b/send+dump/dumpOSC.c index 143a994..083aed0 100644 --- a/send+dump/dumpOSC.c +++ b/send+dump/dumpOSC.c @@ -84,6 +84,7 @@ Technologies, University of California, Berkeley. #include #include #include +#include #ifdef NEED_SCHEDCTL_AND_LOCK #include @@ -172,7 +173,7 @@ static int initudp(int chan) } static void closeudp(int sockfd) { - close(sockfd); + close(sockfd); } static Boolean catchupflag=FALSE; @@ -692,7 +693,7 @@ printf("polldev %d\n", polldevs[j].fd); } } } /* End of while(!caught_sigint) */ - + closeudp(sockfd); out: ; } diff --git a/send+dump/htmsocket.c b/send+dump/htmsocket.c index e4f447f..cb00d4f 100644 --- a/send+dump/htmsocket.c +++ b/send+dump/htmsocket.c @@ -93,8 +93,8 @@ void *OpenHTMSocket(char *host, int portnumber) return 0; if(!host) { - char *mktemp(char *); - int clilen; + // char *mkstemp(char *); + int clilen; o->len = sizeof(ucl_addr); /* * Fill in the structure "userv_addr" with the address of the @@ -124,7 +124,7 @@ void *OpenHTMSocket(char *host, int portnumber) ucl_addr.sun_family = AF_UNIX; strcpy(ucl_addr.sun_path, UNIXDG_TMP); - mktemp(ucl_addr.sun_path); + mkstemp(ucl_addr.sun_path); clilen = sizeof(ucl_addr.sun_family) + strlen(ucl_addr.sun_path); if (bind(sockfd, (struct sockaddr *) &ucl_addr, clilen) < 0) diff --git a/send+dump/sendOSC.c b/send+dump/sendOSC.c index db188dd..d37a539 100644 --- a/send+dump/sendOSC.c +++ b/send+dump/sendOSC.c @@ -55,6 +55,10 @@ compiling: /* #include */ #include +#ifdef unix + #include + #include +#endif typedef struct { enum {INT, FLOAT, STRING} type; @@ -88,7 +92,7 @@ static int exitStatus = 0; static int useTypeTags = 1; -main(int argc, char *argv[]) { +int main(int argc, char *argv[]) { int portnumber; char *hostname = 0; void *htmsocket; -- cgit v1.2.1