From: Markos Chandras <Markos.Chandras@imgtec.com>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH 20/21] nfs/nfsstress/make_tree: Replace integer cast to pointer with 0
Date: Tue, 3 Jan 2012 13:25:09 +0000 [thread overview]
Message-ID: <4F0301B5.7090006@imgtec.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 49 bytes --]
Hi, please review the attached patch
--
markos
[-- Attachment #2: 0020-nfs-nfsstress-make_tree-Replace-integer-cast-to-poin.patch --]
[-- Type: text/plain, Size: 1980 bytes --]
From ff5db5fee1bff9a29aca9cdeaf5fbe00b806d4ea Mon Sep 17 00:00:00 2001
From: Markos Chandras <markos.chandras@imgtec.com>
Date: Thu, 22 Dec 2011 15:18:25 +0000
Subject: [PATCH 20/21] nfs/nfsstress/make_tree: Replace integer cast to pointer with 0
Because pointers are 64-bit on x86_64 architectures, casting a pointer to
integer makes the compiler complain about casting pointer to integer of
different size. We can easily fix this warning by simple replace (int)NULL with
0.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
testcases/network/nfs/nfsstress/make_tree.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/testcases/network/nfs/nfsstress/make_tree.c b/testcases/network/nfs/nfsstress/make_tree.c
index c51e75e..c0b4d22 100644
--- a/testcases/network/nfs/nfsstress/make_tree.c
+++ b/testcases/network/nfs/nfsstress/make_tree.c
@@ -771,7 +771,7 @@ main(int argc, /* number of input parameters */
switch(c)
{
case 'd': /* specify how deep the tree needs to grow */
- if ((num_dirs = atoi(optarg)) == (int)NULL)
+ if ((num_dirs = atoi(optarg)) == 0)
OPT_MISSING(argv[0], optopt);
else
if (num_dirs < 0)
@@ -782,7 +782,7 @@ main(int argc, /* number of input parameters */
}
break;
case 'f': /* how many ".c" files in each directory. */
- if ((num_files = atoi(optarg)) == (int)NULL)
+ if ((num_files = atoi(optarg)) == 0)
OPT_MISSING(argv[0], optopt);
else
if (num_files < 0)
@@ -796,7 +796,7 @@ main(int argc, /* number of input parameters */
usage(argv[0]);
break;
case 't':
- if ((num_thrd = atoi(optarg)) == (int)NULL)
+ if ((num_thrd = atoi(optarg)) == 0)
OPT_MISSING(argv[0], optopt);
else
if (num_thrd < 0)
--
1.7.1
[-- Attachment #3: Type: text/plain, Size: 355 bytes --]
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next reply other threads:[~2012-01-03 13:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-03 13:25 Markos Chandras [this message]
2012-01-03 19:31 ` [LTP] [PATCH 20/21] nfs/nfsstress/make_tree: Replace integer cast to pointer with 0 Garrett Cooper
2012-01-03 20:32 ` Mike Frysinger
2012-01-04 16:03 ` Cyril Hrubis
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=4F0301B5.7090006@imgtec.com \
--to=markos.chandras@imgtec.com \
--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