[ns] DSRAgent warning & "conversion to 'int' may change sign of result"

Porcu Pine shojaru at live.com
Mon Jun 8 04:46:28 PDT 2009


Dear Ns-users,
I am installing ns2.28 on a Pentium4 32-bit processor,Linux version 2.6.28-11-generic (gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4) ). I could not build tcl, tk at first and solved them with removing a " ' " from the line " system=MP-RAS-`awk ' { print $3 } '/etc/.relid` " in all the configure files and then autoconfiguring them. After that I had problems with the files cbq.cc, tora_neighbor.h, filter_core.hh ; and solved them with defining some extra class in the files e.g class CBQueue, class toraAgent, class DiffRoutingAgent respectively.
 
 After these steps, now I am gettting message as follows : 
 
dsr/dsragent.cc: In member function ‘void DSRAgent::dropSendBuff(SRPacket&)’:
dsr/dsragent.cc:207: warning: deprecated conversion from string constant to ‘char*’
dsr/dsragent.cc: In member function ‘void DSRAgent::stickPacketInSendBuffer(SRPacket&)’:
dsr/dsragent.cc:223: warning: deprecated conversion from string constant to ‘char*’
dsr/dsragent.cc: In member function ‘virtual int DSRAgent::command(int, const char* const*)’:
dsr/dsragent.cc:432: warning: deprecated conversion from string constant to ‘char*’
 
...and many more messages like the above,which might be redundant. And all along the installation process, I got thousands of warnings like :
 
./common/packet.h:***: warning: deprecated conversion from string constant to ‘char*’ 
 
and also:
 
./../generic/tclExecute.c:3844: warning: conversion to ‘int’ from ‘unsigned int’ may change the sign of the result
./../generic/tclExecute.c: In function ‘ExprRandFunc’:
./../generic/tclExecute.c:5242: warning: conversion to ‘long unsigned int’ from ‘long int’ may change the sign of the result
..........
./../generic/tclFCmd.c: In function ‘TclFileAttrsCmd’:
./../generic/tclFCmd.c:917: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result
..........
 
/home/user/ns-allinone-2.28/tk8.4.5/unix/../generic/tkCanvas.c: In function ‘CanvasDoEvent’:
/home/user/ns-allinone-2.28/tk8.4.5/unix/../generic/tkCanvas.c:4906: warning: conversion to ‘unsigned int’ from ‘int’ may change the sign of the result
..........
make: *** [dsr/dsragent.o] Error 1
Ns make failed! 
 
 
I tried to solve this as said in the troubleshooting page, adding  the following lines in the Makefile:
 
CCOPT    = -g -Wall -Wno-write-strings
STATIC    = 
LDFLAGS    = $(STATIC)
LDOUT    = -o $(BLANK)
 
But I get exactly the same result even after modifying the makefile.
 
 
Could anyone care to tell me what can I do to solve this?
 
Thank you very much for your kind attention.
 
Regards,
Fatima
Postgraduate student,Department of Electrical Engineering
University of Malaya,KL-50603,Malaysia.

_________________________________________________________________
See all the ways you can stay connected to friends and family
http://www.microsoft.com/windows/windowslive/default.aspx



More information about the Ns-users mailing list