* [LTP] [PATCH 20/21] nfs/nfsstress/make_tree: Replace integer cast to pointer with 0
@ 2012-01-03 13:25 Markos Chandras
2012-01-03 19:31 ` Garrett Cooper
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Markos Chandras @ 2012-01-03 13:25 UTC (permalink / raw)
To: ltp-list
[-- 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
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [LTP] [PATCH 20/21] nfs/nfsstress/make_tree: Replace integer cast to pointer with 0
2012-01-03 13:25 [LTP] [PATCH 20/21] nfs/nfsstress/make_tree: Replace integer cast to pointer with 0 Markos Chandras
@ 2012-01-03 19:31 ` Garrett Cooper
2012-01-03 20:32 ` Mike Frysinger
2012-01-04 16:03 ` Cyril Hrubis
2 siblings, 0 replies; 4+ messages in thread
From: Garrett Cooper @ 2012-01-03 19:31 UTC (permalink / raw)
To: Markos Chandras; +Cc: ltp-list
On Tue, Jan 3, 2012 at 5:25 AM, Markos Chandras
<Markos.Chandras@imgtec.com> wrote:
> Hi, please review the attached patch
It would be better if it was strtoll, but this works for now.
Thanks!
-Garrett
Reviewed-by: Garrett Cooper <yanegomi@gmail.com>
------------------------------------------------------------------------------
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
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [LTP] [PATCH 20/21] nfs/nfsstress/make_tree: Replace integer cast to pointer with 0
2012-01-03 13:25 [LTP] [PATCH 20/21] nfs/nfsstress/make_tree: Replace integer cast to pointer with 0 Markos Chandras
2012-01-03 19:31 ` Garrett Cooper
@ 2012-01-03 20:32 ` Mike Frysinger
2012-01-04 16:03 ` Cyril Hrubis
2 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2012-01-03 20:32 UTC (permalink / raw)
To: ltp-list; +Cc: Markos Chandras
[-- Attachment #1.1: Type: Text/Plain, Size: 116 bytes --]
On Tuesday 03 January 2012 08:25:09 Markos Chandras wrote:
> Hi, please review the attached patch
looks good
-mike
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: 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 #3: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH 20/21] nfs/nfsstress/make_tree: Replace integer cast to pointer with 0
2012-01-03 13:25 [LTP] [PATCH 20/21] nfs/nfsstress/make_tree: Replace integer cast to pointer with 0 Markos Chandras
2012-01-03 19:31 ` Garrett Cooper
2012-01-03 20:32 ` Mike Frysinger
@ 2012-01-04 16:03 ` Cyril Hrubis
2 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2012-01-04 16:03 UTC (permalink / raw)
To: Markos Chandras; +Cc: ltp-list
Hi!
> 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.
Commited, thanks.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-04 15:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-03 13:25 [LTP] [PATCH 20/21] nfs/nfsstress/make_tree: Replace integer cast to pointer with 0 Markos Chandras
2012-01-03 19:31 ` Garrett Cooper
2012-01-03 20:32 ` Mike Frysinger
2012-01-04 16:03 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox