[scribus-dev] Can please someone teach me how to fix the current compiler/build warnings

William Bader williambader at hotmail.com
Sat Dec 12 21:09:27 UTC 2015



From: owen.cook at gmx.com
To: scribus-dev at lists.scribus.net
Date: Fri, 11 Dec 2015 21:01:17 +0100
Subject: Re: [scribus-dev] Can please someone teach me how to fix the current compiler/build warnings


  
  I think if you read man gcc, you will find the option Wall (all warnings) that if turned off will  remove those warnings.



Have you tried searching Google for "cmake turn off warnings"



Still intrigued as to why you want to do this.





Owen

--
In addition, in recent versions of gcc, most warnings contain the name of the option that produced the warning, for example,
testbound.c:13:3: warning: implicit declaration of function ‘memcpy’ [-Wimplicit-function-declaration]
testbound.c:25:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
To eliminate a given warning like -Wimplicit-int, add "no-", for example, -Wno-implicit-int

If someone is particularly bothered by certain warnings, it is better to remove just those warnings than using a blanket -Wno-all

The best option, though, is changing the code not to get the warnings. Even if a warning is not really a problem, like a warning about a possibly uninitialized variable that you can verify is initialized whenever it is used, the warnings can indicate code that is brittle or that requires extra effort from other people who review the code.

For my personal development, I set a high warning level and try to design my code not to get any warnings during builds.  If you get too many warnings, you tend to ignore them, and then it is easy to miss real warnings in the stream of expected warnings.  Warnings can also confuse other people trying to build your code who don't know what is normal and what is really a problem.

Regards, William
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus-dev/attachments/20151212/32e226ef/attachment.html>


More information about the scribus-dev mailing list