From: Alex Elder <aelder@sgi.com>
To: xfs@oss.sgi.com
Subject: Re: [PATCH 0/5] xfstests: eliminate build warnings in the "dmapi" subtree
Date: Tue, 22 Mar 2011 12:35:50 -0500 [thread overview]
Message-ID: <1300815350.2875.12.camel@doink> (raw)
In-Reply-To: <201103041937.p24Jbpgh004834@stout.americas.sgi.com>
Ping?
On Fri, 2011-03-04 at 13:37 -0600, Alex Elder wrote:
> Now that we're building the "dmapi" subtree the same way as the rest
> of the code in "xfstests", a lot of warnings are showing up in the
> build. This series eliminates them all, at least for three build
> architectures I have used so far (i386, x86_64, and ia64).
>
> Because of the sheer number of changes, I've broken it into
> a small series, each focused on files under a certain portion
> of the tree under "dmapi".
>
> Below are the types of warnings, and how they were generally fixed.
> In all cases I scanned the affected code to be reasonably sure the
> warning was harmless and the fix did not obscure a real problem.
> - Variables possibly used before set. Fixed by initializing such
> variables to 0 or NULL, or some appropriate symbolic value if
> available.
> - "Bald" assignments used as conditional values; GCC suggests adding
> an extra set of parentheses. Fixed by pulling the assignments out
> as a previous line of code, and using the assigned value alone in
> the conditional.
> - Variables used in scanf() functions having types that differ from
> what the format string indicates. Fixed by creating and using new
> variables of the type needed for scanf(), and then assigning the
> result to the original variable with a cast.
> - Variables used in printf() functions having types that differ from
> what the format string indicates. Fixed by casting the variable
> to the type indicated in the format string. In a few cases I
> changed "%lld" formats to "%llu" to be consistent with other usage
> for printing the same variable. (But I did not do this
> consistently.)
> - A lot of these cases involved using "%zd" in place of just
> "%d" for printing size_t objects.
> - In one case, replaced a call to tmpnam() with an equivalent call
> to mkstmp() using a local variable.
>
> Patch 1 covers files under:
> dmapi/src/common/cmd/
> dmapi/src/common/lib/
> dmapi/src/sample_hsm/
> dmapi/src/simple/
>
> Patch 2 covers:
> dmapi/src/suite1/cmd/ (part 1)
>
> Patch 3 covers:
> dmapi/src/suite1/cmd/ (part 2)
>
> Patch 4 covers:
> dmapi/src/suite1/cmd/ (part 3)
>
> Patch 5 covers:
> dmapi/src/suite2/
>
> -Alex
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2011-03-22 17:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 19:37 [PATCH 0/5] xfstests: eliminate build warnings in the "dmapi" subtree Alex Elder
2011-03-22 17:35 ` Alex Elder [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1300815350.2875.12.camel@doink \
--to=aelder@sgi.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox