lkml.org 
[lkml]   [2006]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: make-bogus-warnings-go-away tree
    From
    Date
        Jeff> So, I agree that annotations are a good idea, but I'm not so
    Jeff> sure that your proposed "= 0" approach is the best one.
    Jeff> Remember, we need to do this for multi-member structures,
    Jeff> integers, and pointers, not just things easily assigned to
    Jeff> zero.

    Not to mention the fact that "foo = 0" generates extra (probably
    unnecessary) code to initialize foo, while "foo = foo" just shuts up
    the gcc warning without affecting generated code.

    I'm already somewhat unconfortable shutting up these gcc warnings at
    all, since adding these annotations add one more thing that must be
    maintained -- I feel it would be all-too-easy to change the logic of a
    function in a way that introduces a bug, and then have the annotation
    hide a "is used uninitialised" warning.

    But I definitely feel we shouldn't make our object code even slightly
    worse just to shut up the warnings.

    - R.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-10-05 18:23    [W:2.354 / U:0.436 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site