Language Selection

English French German Italian Portuguese Spanish

GCC, Useful Versus Useless Warnings

Filed under
Linux

Linux creator Linus Torvalds proclaimed, "friends don't let friends use '-W'," in a thread discussing GCC's handling of warnings. The thread began with a patch to remove an unnecessary comparison of an unsigned variable which resulted in a GCC warning, "comparison of unsigned expression < 0 is always false". Linus suggested it is better to write readable and obvious code, "without having to carry stupid context around in our heads". He went on to add, "if the compiler (whose _job_ it is to carry all that context and use it to generate good code) notices that the fact that 'x' is unsigned means that one of the tests is unnecessary, that does not make it wrong." As has been noted in several earlier lkml discussions [story], Linus concluded, "Gcc warns for a lot of wrong things. This is one of them."

Later in the thread, Linus pointed out that GCC also offers plenty of useful warnings as well.

Full Story.

More in Tux Machines

Firefox OS media-casting stick strikes Kickstarter gold

The first Firefox OS based media player has arrived on Kickstarter, in the form of a $25 open-spec HDMI stick that supports Chromecast-like content casting. The Matchstick, which has already zoomed past its Kickstarter campaign’s $100,000 funding goal, with 28 days still remaining, was teased back in June by Mozilla developer evangelist Christian Heilmann. The unnamed prototype was billed as an open source HDMI stick that runs Mozilla’s Linux-based Firefox OS and offers casting capabilities. Few details were revealed at the time except that the device used the same DIAL (DIscovery And Launch) media-casting protocol created by Netflix and popularized by Google’s Chromecast. Read more

Open source history, present day, and licensing

Looking at open source softwares particularly, this is a fact that is probably useful to you if you are thinking about business models, many people don't care about it anymore. We talk about FOSS, Free and Open Source Software, but if we really are strict there's a difference between free software and open source software. On the left, I have free software which most typically is GPL software. Software where the license insures freedom. It gives freedoms to you as a user, but it also requires that the freedoms are maintained. On the right-hand side, you have open source software which is open for all, but it also allows you to close it. So here we come back to the famous clause of the GPL license, the reciprocity requirement which says, "If I am open, you need to be open." So software that comes under the GPL license carries with it something that other people call a virus. I call it a blessing because I think it's great if all software becomes open. Read more

Leftovers: Software

Proprietary

today's howtos