The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Build with -Wall dammit!

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Daniel Berger

Posts: 1383
Nickname: djberg96
Registered: Sep, 2004

Daniel Berger is a Ruby Programmer who also dabbles in C and Perl
Build with -Wall dammit! Posted: Feb 8, 2005 7:31 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Daniel Berger.
Original Post: Build with -Wall dammit!
Feed Title: Testing 1,2,3...
Feed URL: http://djberg96.livejournal.com/data/rss
Feed Description: A blog on Ruby and other stuff.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Daniel Berger
Latest Posts From Testing 1,2,3...

Advertisement
Here's a bit of advice to anyone writing C extensions for Ruby and gcc: always build with -Wall. Just stick "export CC='gcc -Wall'" in your .bashrc file, or your preferred shell's equivalent. If you're feeling extra careful, add an extra '-W' at the end of that.

It's a great way to catch potential problems in your C source. Heck, I've found even found bugs in the code of some of our more esteemed C coders this way.

I'm just tired of seeing gobs of warnings in C extensions that could be avoided by building with -Wall. Probably the number one warning is "unused variable" - sloppy. I know that sometimes warnings are unavoidable, and that's fine as long as you mention it somewhere in the docs. Otherwise, your code should be warning free

Read: Build with -Wall dammit!

Topic: Releasing ruby2c 1.0.0 beta 1 Previous Topic   Next Topic Topic: Runaway Train?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use