Werner Smekal wrote: > Hi, > >> The C compiler complained about a number of errors in our source >> files that >> other compilers did not notice or gave warnings about. I did not have >> time >> yet to look into them, but I think it is worth checking these. > > > Visual C++ 2005 gives also tons of warnings, especially about the use > of sprintf (instead of snprintf), deprecated features (according to > the C99 standard) and unused variables. Question is, if we should > change the code accordingly - I would highly suggest it and would also > do some work on it - or are there some opinions against such changes?
Well, warnings I have seen from Visual C/C++ 6.0 (the ancient one) are mostly about longs being implicitly converted to ints and the like. Adding explicit casts may silence the compiler, but the code is not going to work better and certainly is not going to be more readable - in my opinion. I think we will need to be careful here. I vote yes to these issues: - remove unused variables (makes the code less confusing) - check the use of sprintf() (makes the code safer) - functions that do not return a value but should (makes the code safer too) I do not know enough about C99 to comment on deprecated features, but I would not like to see explicit casts all over the place. Regards, Arjen ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel