fix extra warnings

channel.c:116:12: warning: comparison between signed and unsigned integer expressions
fd.c:19:14: warning: unused parameter ‘v’
task.c:316:14: warning: unused parameter ‘s’
task.c:346:21: warning: unused parameter ‘v’
This commit is contained in:
David du Colombier 2012-08-01 02:00:00 +02:00
parent 0609977c6e
commit eed781b1a9
5 changed files with 8 additions and 3 deletions

View File

@ -19,7 +19,7 @@ $(OFILES): taskimpl.h task.h 386-ucontext.h power-ucontext.h
AS=gcc -c AS=gcc -c
CC=gcc CC=gcc
CFLAGS=-Wall -c -I. -ggdb CFLAGS=-Wall -Wextra -c -I. -ggdb
%.o: %.S %.o: %.S
$(AS) $*.S $(AS) $*.S

View File

@ -104,7 +104,7 @@ altqueue(Alt *a)
static void static void
altdequeue(Alt *a) altdequeue(Alt *a)
{ {
int i; unsigned int i;
Altarray *ar; Altarray *ar;
ar = chanarray(a->c, a->op); ar = chanarray(a->c, a->op);

3
fd.c
View File

@ -21,7 +21,8 @@ fdtask(void *v)
int i, ms; int i, ms;
Task *t; Task *t;
uvlong now; uvlong now;
USED(v);
tasksystem(); tasksystem();
taskname("fdtask"); taskname("fdtask");
for(;;){ for(;;){

2
task.c
View File

@ -319,6 +319,7 @@ taskinfo(int s)
Task *t; Task *t;
char *extra; char *extra;
USED(s);
fprint(2, "task list:\n"); fprint(2, "task list:\n");
for(i=0; i<nalltask; i++){ for(i=0; i<nalltask; i++){
t = alltask[i]; t = alltask[i];
@ -345,6 +346,7 @@ int mainstacksize;
static void static void
taskmainstart(void *v) taskmainstart(void *v)
{ {
USED(v);
taskname("taskmain"); taskname("taskmain");
taskmain(taskargc, taskargv); taskmain(taskargc, taskargv);
} }

View File

@ -9,6 +9,8 @@
# endif # endif
#endif #endif
#define USED(x) if(x){}else{}
#define USE_UCONTEXT 1 #define USE_UCONTEXT 1
#if defined(__OpenBSD__) || defined(__mips__) #if defined(__OpenBSD__) || defined(__mips__)