Messages in this thread | | | Subject | Re: make-bogus-warnings-go-away tree | From | Roland Dreier <> | Date | Thu, 05 Oct 2006 09:21:10 -0700 |
| |
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/
| |