public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Subrata Modak <subrata@linux.vnet.ibm.com>
To: Jiri Palecek <jpalecek@web.de>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] Other compiler warning fixes
Date: Mon, 02 Nov 2009 19:29:28 +0530	[thread overview]
Message-ID: <1257170368.4977.61.camel@subratamodak.linux.ibm.com> (raw)
In-Reply-To: <200910301649.n9UGnbHJ001240@e34.co.us.ibm.com>

Thanks. Just a small correction below:

On Wed, 2009-10-21 at 21:37 +0200, Jiri Palecek wrote: 
> Hello,
> 
> this is another chunk of compiler warning fixes in LTP tests, related to printf format strings. They have multiple causes:
> 
>  - most of them are caused by %d used for the TEST_RETURN variable (as in a previous patch)
> 
>  - off_t are cast to (int64_t) and PRId64 output specifier is used for them
> 
>  - other types are cast to (intmax_t) or (uintmax_t) and use the %jd or %ju (C99) output specifier. I've used this solution because it's generally correct, easy to use solution that is portable and (IMHO) more readable than using PRId64/PRIu64 and a cast (which you generally can't avoid). This way, there's only a cast.
> 
>  - in ioperm test, address should be declared as unsigned long (according to ioperm(2))
> 
>  - other little fixes (foo vs. *foo, %S vs. %s, %0 vs. %o)
> 
> Regards
>     Jiri Palecek
> 
> diff --git a/testcases/kernel/syscalls/socketcall/socketcall03.c b/testcases/kernel/syscalls/socketcall/socketcall03.c
> index 9cc2de4..de63784 100644
> --- a/testcases/kernel/syscalls/socketcall/socketcall03.c
> +++ b/testcases/kernel/syscalls/socketcall/socketcall03.c
> @@ -127,12 +127,12 @@ int main(int ac, char **av)
>  		/* check return code */
> 
>  		if (TEST_RETURN == -1) {
> -			tst_resm(TFAIL, "socketcall() Failed "
> -				 " with return=%d,errno=%d: %s",
> -				 TEST_RETURN, TEST_ERRNO, strerror(TEST_ERRNO));
> +			tst_resm(TFAIL|TTERNO, "socketcall() Failed "

+ tst_resm(TFAIL|TERRNO, "socketcall() Failed "

Regards--
Subrata



------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

       reply	other threads:[~2009-11-02 13:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200910301649.n9UGnbHJ001240@e34.co.us.ibm.com>
2009-11-02 13:59 ` Subrata Modak [this message]
     [not found] <4aeb19e8.8c13f30a.0cad.ffffd3c6SMTPIN_ADDED@mx.google.com>
2009-10-30 21:21 ` [LTP] [PATCH] Other compiler warning fixes Mike Frysinger
2009-10-21 19:37 Jiri Palecek

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=1257170368.4977.61.camel@subratamodak.linux.ibm.com \
    --to=subrata@linux.vnet.ibm.com \
    --cc=jpalecek@web.de \
    --cc=ltp-list@lists.sourceforge.net \
    /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