resolve warnings from current g++ pyrit
authorRadek Brich <radek.brich@devl.cz>
Sat, 17 Nov 2007 17:47:06 +0100
branchpyrit
changeset 5 2d97ea5e711a
parent 4 c73bc405ee7a
child 6 d8d596d26f25
resolve warnings from current g++
Makefile
src/raytracer.cc
src/raytracer.h
--- a/Makefile	Sat Nov 17 17:20:36 2007 +0100
+++ b/Makefile	Sat Nov 17 17:47:06 2007 +0100
@@ -1,4 +1,4 @@
-CCFLAGS=-Wall -O3 -I./src -DPTHREADS -pthread -fno-strict-aliasing
+CCFLAGS=-Wall -Wno-write-strings -O3 -I./src -DPTHREADS -pthread -fno-strict-aliasing
 LDFLAGS=
 
 ifeq ($(OS), Windows_NT)
--- a/src/raytracer.cc	Sat Nov 17 17:20:36 2007 +0100
+++ b/src/raytracer.cc	Sat Nov 17 17:47:06 2007 +0100
@@ -233,11 +233,11 @@
 	printf("* pthreads enabled, using %d threads\n", num_threads);
 	pthread_t threads[num_threads];
 	for (int t = 0; t < num_threads; t++)
-		threads[t] = NULL;
+		threads[t] = 0;
 	int t = 0;
 #endif
 
-	printf("* rendering row   0 (  0% done)");
+	printf("* rendering row   0 (  0%% done)");
 	for (int y = 0; y < h; y++) {
 		d = (RenderrowData*) malloc(sizeof(RenderrowData));
 		d->rt = this;
@@ -260,7 +260,7 @@
 			t = 0;
 		/* wait for next thread in fifo queue, so the descriptor can be reused;
 		   this also limits number of running threads */
-		if (threads[t] != NULL)
+		if (threads[t] != 0)
 			if (pthread_join(threads[t], (void**)&d) == 0)
 				free(d);
 #else
--- a/src/raytracer.h	Sat Nov 17 17:20:36 2007 +0100
+++ b/src/raytracer.h	Sat Nov 17 17:47:06 2007 +0100
@@ -32,7 +32,7 @@
 	Vector3 eye;
 	float *iter;
 };
-static void *renderrow(void *data);
+//static void *renderrow(void *data);
 
 class Raytracer
 {