Isn't "turning them on" a fairly cheap price of doing business?
Clearly, your problem case suggests that an option might be to "use warnings" after you've dealt with the more significant warnings errors/problems that are apt to turn up in new code... and even then, the price of going thru "tons" of code to check the then-new onslaught of warnings seems to me to be insignificant compared to the price of an error that gives away your product or that causes a client to suffer harm.
And one more thought:
- ...if the "uninitialized" warning is your real concern, it might suggest that some re-thinking the timing and manner of instantiating variables would be appropriate... to clean up what might be considered a code-smell.
If that seems too expensive, or the types of warnings are more diverse than you feel you can afford to deal with, perhaps its time to consider that the cost of selectively inserting "no warnings uninitialized" suggested by Vicar Eily is likely to be NO HIGHER and to pay the bonus of being clearer.
Edit: Strike/corrected language in para 1; fixed markup on "code smell" and fixed "that" to "than" in final para.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|