Author: Uri Blass
Date: 06:17:25 12/31/02
Go up one level in this thread
On December 31, 2002 at 09:13:15, Uri Blass wrote: >How do I get rid of this warning? > >C:\unzipped\movei257source\main.c(939): warning #181: argument is incompatible >with corresponding format string conversion > num_fields=sscanf(buffer,"level%s %s %s %s %s %s %s %s >%s",&str1,&str2,&str3,&str4,&str5,&str6, > >Is there something wrong with the following? > >int num_fields=0; >char >str1[10],str2[10],str3[10],str4[10],str5[10],str6[10],str7[10],str8[10],str9[10]; >num_fields=sscanf(buffer,"level%s %s %s %s %s %s %s %s >%s",&str1,&str2,&str3,&str4,&str5,&str6, > &str7,&str8,&str9); > >I use it to read the winboard command after level(can be not more than 9 even in >the extended level command). >There were no problems with it but for some reasons the intel compiler see >problems. > >For now there is no speed change from the intel compiler but I still did not >learn how to do profile optimization and I use only optimize for speed. > >Uri I can add that I do not need int num_fields=0 but I did not care about optimization for speed here because reading the level command is not something that is done in the search. I only now see that there is initialization that is not needed. I also guess that the compiler may be smart enough to understand it and will not initialize num_fields to 0 but I have no idea if I am right. Uri
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.