On Friday 28 August 2009 04:48:08 Geert Uytterhoeven wrote:
> On Fri, 28 Aug 2009, Subrata Modak wrote:
> > Sorry. I need to revert this as it generates a huge set of warning for
> > all the tests compiled. It should not only get fixed at test.h, but also
> > in all tests that uses the tst_* family of functions, which obviously is
> > too big to fix.
>
> Yes, it should be fixed elsewhere, too. Reverting TEST_ERRNO to int should
> kill a few thousand of them...

ive fixed that (i always thought it weird TEST_ERRNO was declared as a long).  
most of the remaining warnings are because TEST_RESULT is a long, but that is 
understandable.  we cram the result of arbitrary functions into it and we need 
something that is big enough.

that brings us down to ~900 warnings in testcases/kernel/syscalls/

> But without enabling the warnings, you don't notice the real bugs, where
> integers are passed instead of string pointers.

current warnings:
 - printf mismatches (i.e. long given to a %d)
 - NULL strings used for printf output
        - the tst_res code allows for this, but if you dont want output, then 
an 
empty string "" works just as well as a NULL string
 - too many arguments to printf string
 - too few arguments to printf string
 - incorrect printf string
 - some others

considering many of these printf's only get used when an error occurs (i.e. 
not normally executed), a crash is not likely to be noticed.  so doing this 
extra work of fixing the warnings is certainly worth it in my book.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to