Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Meet and Greet (http://www.go4expert.com/community/meet-and-greet/)
-   -   compiling c code with g++ option, unable to resolve warnings (http://www.go4expert.com/community/compiling-c-code-g-option-unable-t25338/)

ashwinksk 25Mar2011 12:29

compiling c code with g++ option, unable to resolve warnings
 
Hi all,
I am compiling my code with below mentioned option, i am getting some strange error,

The warning what i am getting is
Quote:

cm_os.c:166: warning: ISO C++ forbids declaration of ‘mmap’ with no type
cm_os.c:168: warning: ISO C++ forbids declaration of ‘munmap’ with no type
And compiler option which i am using to compile is

Code:

g++  -c -g3 -m32 -ansi -fpermissive -pipe  -Wall -Wno-comment -Wcast-align -Wcast-qual
and the code part is
Quote:

extern mmap (S8 *addr, OsSize len, OsInt prot, OsInt flags, OsInt fildes, OsLong off);

extern munmap (S8 *addr, OsSize len);
can any one tell me how can i solve this warnings :mad:


All times are GMT +5.5. The time now is 15:46.