* [LTP] [PATCH 16/21] kernel/vma: Add missing return statement for non-void functions
@ 2012-01-03 13:21 Markos Chandras
2012-01-03 20:32 ` Mike Frysinger
0 siblings, 1 reply; 2+ messages in thread
From: Markos Chandras @ 2012-01-03 13:21 UTC (permalink / raw)
To: ltp-list
[-- Attachment #1: Type: text/plain, Size: 49 bytes --]
Hi, please review the attached patch
--
markos
[-- Attachment #2: 0016-kernel-vma-Add-missing-return-statement-for-non-void.patch --]
[-- Type: text/plain, Size: 1442 bytes --]
From b5bec4470a937d9d63b05798d34c0c33c19348d4 Mon Sep 17 00:00:00 2001
From: Markos Chandras <markos.chandras@imgtec.com>
Date: Thu, 22 Dec 2011 15:04:50 +0000
Subject: [PATCH 16/21] kernel/vma: Add missing return statement for non-void functions
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
testcases/kernel/mem/vma/vma01.c | 2 ++
testcases/kernel/mem/vma/vma02.c | 5 +++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/testcases/kernel/mem/vma/vma01.c b/testcases/kernel/mem/vma/vma01.c
index 398d7a1..14c0525 100644
--- a/testcases/kernel/mem/vma/vma01.c
+++ b/testcases/kernel/mem/vma/vma01.c
@@ -151,6 +151,8 @@ static void *get_end_addr(void *addr_s, char *mapfile)
}
fclose(fp);
tst_brkm(TBROK, cleanup, "no matched s = %p found.", addr_s);
+
+ return NULL;
}
static void check_status(int status)
diff --git a/testcases/kernel/mem/vma/vma02.c b/testcases/kernel/mem/vma/vma02.c
index a1c8f24..fe7cff6 100644
--- a/testcases/kernel/mem/vma/vma02.c
+++ b/testcases/kernel/mem/vma/vma02.c
@@ -152,6 +152,9 @@ int main(int argc, char** argv)
tst_brkm(TWARN|TERRNO, NULL, "munmap");
}
tst_exit();
+
+ /* We should never be here */
+ return 0;
}
void usage(void)
@@ -166,5 +169,7 @@ int main(void) {
#else /* no NUMA */
int main(void) {
tst_brkm(TCONF, NULL, "no NUMA development packages installed.");
+ /* We should never be here */
+ return 0;
}
#endif
--
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] 2+ messages in thread
* Re: [LTP] [PATCH 16/21] kernel/vma: Add missing return statement for non-void functions
2012-01-03 13:21 [LTP] [PATCH 16/21] kernel/vma: Add missing return statement for non-void functions Markos Chandras
@ 2012-01-03 20:32 ` Mike Frysinger
0 siblings, 0 replies; 2+ 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: 374 bytes --]
On Tuesday 03 January 2012 08:21:48 Markos Chandras wrote:
> Hi, please review the attached patch
two of these hunks are fallout of your tst_brkm() no attribute change. those
don't actually return, so there shouldn't be a need to add explicit returns.
the 3rd hunk (adding a return after tst_exit) is wrong -- that is marked
noreturn and isn't changing.
-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] 2+ messages in thread
end of thread, other threads:[~2012-01-03 20:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-03 13:21 [LTP] [PATCH 16/21] kernel/vma: Add missing return statement for non-void functions Markos Chandras
2012-01-03 20:32 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox