changeset 843:0c7d885f0c92

cleanup unused variables and fix warning.
author kazz <kazz@cr.ie.u-ryukyu.ac.jp>
date Wed, 02 Jun 2010 02:03:40 +0900
parents ec1a408fea94
children 61bfd8e246fc
files Renderer/Engine/SceneGraph.h Renderer/Engine/lindaapi.cc Renderer/Engine/lindaapi.h Renderer/Engine/viewer.cc Renderer/Test/dynamic_create.cc Renderer/Test/send_linda.cc
diffstat 6 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/Renderer/Engine/SceneGraph.h	Wed Jun 02 01:40:06 2010 +0900
+++ b/Renderer/Engine/SceneGraph.h	Wed Jun 02 02:03:40 2010 +0900
@@ -32,7 +32,7 @@
     int id;
 	// Objectのシーケンス番号(Linda)
 	// とりあえず動かしたいので追加
-	int seq, seq_rd, resend_flag;
+	int seq, resend_flag;
 	
     int property_size;
     void *propertyptr;
--- a/Renderer/Engine/lindaapi.cc	Wed Jun 02 01:40:06 2010 +0900
+++ b/Renderer/Engine/lindaapi.cc	Wed Jun 02 02:03:40 2010 +0900
@@ -203,7 +203,7 @@
       失敗すると -1 を返す。
 /-------------------------------------------------------------------*/
 int
-open_linda(char * hostname, int port){
+open_linda(const char *hostname, int port){
     int fd;
     struct hostent *hoste;
     struct sockaddr_in serv_addr;
@@ -260,7 +260,7 @@
 }
 
 int
-open_linda_java(char * hostname, int port){
+open_linda_java(const char *hostname, int port){
     int fd;
     struct hostent *hoste;
     struct sockaddr_in serv_addr;
--- a/Renderer/Engine/lindaapi.h	Wed Jun 02 01:40:06 2010 +0900
+++ b/Renderer/Engine/lindaapi.h	Wed Jun 02 02:03:40 2010 +0900
@@ -52,8 +52,8 @@
 ----------------------------------------------------------------------*/
 
 extern void init_linda(void);
-extern int open_linda(char *hostname, int port);
-extern int open_linda_java(char *hostname, int port);
+extern int open_linda(const char *hostname, int port);
+extern int open_linda_java(const char *hostname, int port);
 extern int close_linda(int tspace_id);
 
 extern void psx_free(void*);
--- a/Renderer/Engine/viewer.cc	Wed Jun 02 01:40:06 2010 +0900
+++ b/Renderer/Engine/viewer.cc	Wed Jun 02 02:03:40 2010 +0900
@@ -144,7 +144,7 @@
 
     light_sysswitch = (int*)manager->allocate(size);
 
-    for (int i = 0; i < size / sizeof(int); i++) {
+    for (unsigned int i = 0; i < size / sizeof(int); i++) {
       light_sysswitch[i] = 0;
     }
 
--- a/Renderer/Test/dynamic_create.cc	Wed Jun 02 01:40:06 2010 +0900
+++ b/Renderer/Test/dynamic_create.cc	Wed Jun 02 02:03:40 2010 +0900
@@ -94,11 +94,11 @@
 {
     SceneGraphRoot *sgroot = (SceneGraphRoot *)sgroot_;
 	// LindaServerから座標データを取得してオブジェクトに反映させる。
-	unsigned char *reply_rd = psx_reply(node->seq_rd);
-	if (reply_rd != NULL) {
-		set_position(node, reply_rd);
-		free(reply_rd);
-		node->seq_rd = psx_wait_rd(sgroot->tid, node->id * 10 + 1);
+	unsigned char *reply = psx_reply(node->seq);
+	if (reply != NULL) {
+		set_position(node, reply);
+		free(reply);
+		node->seq = psx_wait_rd(sgroot->tid, node->id * 10 + 1);
 	}
 }
 
@@ -118,7 +118,7 @@
     sgroot->createFromXMLmemory(sgroot->tmanager, child, (char *)data, len);
     child->set_move_collision(moon_move, moon_collision);
     child->id = serial_id;
-	child->seq_rd = psx_wait_rd(sgroot->tid, serial_id * 10 + 1);
+	child->seq = psx_wait_rd(sgroot->tid, serial_id * 10 + 1);
 
     return child;
 }
@@ -166,7 +166,7 @@
     psx_callback_in(carg->tid, carg->read_id, callbacker, arg);
 }
 
-static char *linda = (char *)"localhost";
+static const char *linda = "localhost";
 
 static void
 linda_init(TaskManager *manager, SceneGraphRoot *sgroot, client_t *clist, SceneGraphPtr node)
--- a/Renderer/Test/send_linda.cc	Wed Jun 02 01:40:06 2010 +0900
+++ b/Renderer/Test/send_linda.cc	Wed Jun 02 02:03:40 2010 +0900
@@ -151,7 +151,7 @@
 }
 
 static char *xml;
-static char *linda = HOSTNAME;
+static const char *linda = HOSTNAME;
 
 MainLoopPtr 
 send_linda::init(Viewer *sgr, int screen_w, int screen_h)