]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix void warnings
authorRuss Cox <rsc@golang.org>
Tue, 23 Aug 2011 17:13:27 +0000 (13:13 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 23 Aug 2011 17:13:27 +0000 (13:13 -0400)
Add -V flag to 6c command line to keep them fixed.

R=ken2
CC=golang-dev
https://golang.org/cl/4930046

src/pkg/runtime/Makefile
src/pkg/runtime/chan.c
src/pkg/runtime/proc.c
src/pkg/runtime/runtime.c
src/pkg/runtime/runtime.h

index 64bd2b77146849665a3d38aba9f843c275db9bc3..df46d0391c2c6a1fd4b58398135a69dbe29f1f9f 100644 (file)
@@ -13,7 +13,7 @@ SIZE_arm=32
 SIZE=$(SIZE_$(GOARCH))
 
 CFLAGS_windows=-D__WINDOWS__
-CFLAGS=-I$(GOOS) -I$(GOARCH) -I$(GOOS)/$(GOARCH) -wF $(CFLAGS_$(GOARCH)) $(CFLAGS_$(GOOS))
+CFLAGS=-I$(GOOS) -I$(GOARCH) -I$(GOOS)/$(GOARCH) -FVw $(CFLAGS_$(GOARCH)) $(CFLAGS_$(GOOS))
 
 GOFILES=\
        debug.go\
index 92a6c288bfc885f180a8678ac015f0d6861bc990..eac2098c396dac1bc14d24066cea57ec05dad0c9 100644 (file)
@@ -105,7 +105,7 @@ runtime·makechan_c(ChanType *t, int64 hint)
        // allocate memory in one call
        c = (Hchan*)runtime·mal(n + hint*elem->size);
        if(runtime·destroylock)
-               runtime·addfinalizer(c, destroychan, 0);
+               runtime·addfinalizer(c, (void*)destroychan, 0);
 
        c->elemsize = elem->size;
        c->elemalg = &runtime·algarray[elem->alg];
index 3a431ef35e0842914f7ed405f7bfcf04f61ccd18..cc075741d1be4d85c1e208fca94e5f70100f1695 100644 (file)
@@ -1604,7 +1604,7 @@ os·setenv_c(String k, String v)
        runtime·memmove(arg[1], v.str, v.len);
        arg[1][v.len] = 0;
 
-       runtime·asmcgocall(libcgo_setenv, arg);
+       runtime·asmcgocall((void*)libcgo_setenv, arg);
        runtime·free(arg[0]);
        runtime·free(arg[1]);
 }
index c4bd40882936a03948af6f846048526990f9b584..ae6fd877c7014e78254e74e2a772b72599d75ff9 100644 (file)
@@ -638,20 +638,20 @@ runtime·algarray[] =
 {
 [AMEM] { memhash, memequal, memprint, memcopy },
 [ANOEQ]        { runtime·nohash, runtime·noequal, memprint, memcopy },
-[ASTRING]      { strhash, strequal, strprint, strcopy },
-[AINTER]               { interhash, interequal, interprint, intercopy },
-[ANILINTER]    { nilinterhash, nilinterequal, nilinterprint, nilintercopy },
-[ASLICE]       { runtime·nohash, runtime·noequal, memprint, slicecopy },
-[AMEM8]                { memhash, memequal8, memprint, memcopy8 },
-[AMEM16]       { memhash, memequal16, memprint, memcopy16 },
-[AMEM32]       { memhash, memequal32, memprint, memcopy32 },
-[AMEM64]       { memhash, memequal64, memprint, memcopy64 },
-[AMEM128]      { memhash, memequal128, memprint, memcopy128 },
-[ANOEQ8]       { runtime·nohash, runtime·noequal, memprint, memcopy8 },
-[ANOEQ16]      { runtime·nohash, runtime·noequal, memprint, memcopy16 },
-[ANOEQ32]      { runtime·nohash, runtime·noequal, memprint, memcopy32 },
-[ANOEQ64]      { runtime·nohash, runtime·noequal, memprint, memcopy64 },
-[ANOEQ128]     { runtime·nohash, runtime·noequal, memprint, memcopy128 },
+[ASTRING]      { (void*)strhash, (void*)strequal, (void*)strprint, (void*)strcopy },
+[AINTER]               { (void*)interhash, (void*)interequal, (void*)interprint, (void*)intercopy },
+[ANILINTER]    { (void*)nilinterhash, (void*)nilinterequal, (void*)nilinterprint, (void*)nilintercopy },
+[ASLICE]       { (void*)runtime·nohash, (void*)runtime·noequal, (void*)memprint, (void*)slicecopy },
+[AMEM8]                { memhash, (void*)memequal8, memprint, (void*)memcopy8 },
+[AMEM16]       { memhash, (void*)memequal16, memprint, (void*)memcopy16 },
+[AMEM32]       { memhash, (void*)memequal32, memprint, (void*)memcopy32 },
+[AMEM64]       { memhash, (void*)memequal64, memprint, (void*)memcopy64 },
+[AMEM128]      { memhash, (void*)memequal128, memprint, (void*)memcopy128 },
+[ANOEQ8]       { runtime·nohash, runtime·noequal, memprint, (void*)memcopy8 },
+[ANOEQ16]      { runtime·nohash, runtime·noequal, memprint, (void*)memcopy16 },
+[ANOEQ32]      { runtime·nohash, runtime·noequal, memprint, (void*)memcopy32 },
+[ANOEQ64]      { runtime·nohash, runtime·noequal, memprint, (void*)memcopy64 },
+[ANOEQ128]     { runtime·nohash, runtime·noequal, memprint, (void*)memcopy128 },
 };
 
 int64
index 1e52d76ad08d437e6bc648a372b697089c825a4f..84bab5877227aa8246b7f242909aeaeb5929b701 100644 (file)
@@ -630,8 +630,8 @@ void        runtime·mapiterkeyvalue(struct hash_iter*, void*, void*);
 Hmap*  runtime·makemap_c(MapType*, int64);
 
 Hchan* runtime·makechan_c(ChanType*, int64);
-void   runtime·chansend(ChanType*, Hchan*, void*, bool*);
-void   runtime·chanrecv(ChanType*, Hchan*, void*, bool*, bool*);
+void   runtime·chansend(ChanType*, Hchan*, byte*, bool*);
+void   runtime·chanrecv(ChanType*, Hchan*, byte*, bool*, bool*);
 int32  runtime·chanlen(Hchan*);
 int32  runtime·chancap(Hchan*);
 bool   runtime·showframe(Func*);