All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] Fix compiler warnings for performance_counter tests
@ 2009-08-03  2:20 Garrett Cooper
  2009-08-13  4:36 ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Garrett Cooper @ 2009-08-03  2:20 UTC (permalink / raw)
  To: LTP list

This simply fixes some missing declarations and linux_syscall_number.h
cleanup related compiler warnings.

This is ok for commit to HEAD.

Signed-off-by: Garrett Cooper <yanegomi@gmail.com>

Index: testcases/kernel/performance_counters/performance_counter01.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/performance_counters/performance_counter01.c,v
retrieving revision 1.2
diff -u -r1.2 performance_counter01.c
--- testcases/kernel/performance_counters/performance_counter01.c	23
Jun 2009 14:21:32 -0000	1.2
+++ testcases/kernel/performance_counters/performance_counter01.c	3
Aug 2009 02:19:38 -0000
@@ -50,7 +50,7 @@
 char *TCID     = "performance_counter01"; /* test program identifier.
         */
 int  TST_TOTAL = 1;

-#define cleanup tst_exit /* for now... */
+static void cleanup(void) { /* Stub function. */ }

 int perf_counter_open(int		hw_event_type,
                       unsigned int	hw_event_period,
@@ -71,7 +71,8 @@
 	PERF_COUNT_BRANCH_MISSES,
 };

-int main(void) {
+int
+main(void) {
 	unsigned long long count1, count2;
 	int fd1, fd2, ret;
 	fd1 = perf_counter_open(PERF_COUNT_INSTRUCTIONS, 0, 0, 0, -1);
Index: testcases/kernel/performance_counters/performance_counter02.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/performance_counters/performance_counter02.c,v
retrieving revision 1.2
diff -u -r1.2 performance_counter02.c
--- testcases/kernel/performance_counters/performance_counter02.c	23
Jun 2009 14:21:32 -0000	1.2
+++ testcases/kernel/performance_counters/performance_counter02.c	3
Aug 2009 02:19:38 -0000
@@ -62,6 +62,8 @@
 #include <poll.h>
 #include <unistd.h>
 #include <errno.h>
+#include "config.h"
+#include <sys/prctl.h>
 #include <sys/types.h>
 #include <linux/types.h>
 #include <syscall.h>
@@ -82,7 +84,7 @@
 char *TCID     = "performance_counter02"; /* test program identifier.
         */
 int  TST_TOTAL = 1;                  /* total number of tests in this
file.   */

-#define cleanup tst_exit /* for now... */
+static void cleanup(void) { /* Stub function. */ }

 typedef unsigned int u32;
 typedef unsigned long long u64;
@@ -141,6 +143,7 @@
 		asm volatile("" : : "g" (i));
 }

+int
 main(int ac, char **av)
 {
 	int tsk0;
@@ -238,5 +241,5 @@
 	}

 	fprintf(stderr, "test passed\n");
-	exit(0);
+	tst_exit();
 }

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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

* Re: [LTP] [PATCH] Fix compiler warnings for performance_counter tests
  2009-08-03  2:20 [LTP] [PATCH] Fix compiler warnings for performance_counter tests Garrett Cooper
@ 2009-08-13  4:36 ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2009-08-13  4:36 UTC (permalink / raw)
  To: ltp-list


[-- Attachment #1.1: Type: text/plain, Size: 273 bytes --]

On Sunday 02 August 2009 22:20:07 Garrett Cooper wrote:
> This simply fixes some missing declarations and linux_syscall_number.h
> cleanup related compiler warnings.

your e-mail has line wrapping problems

> -int main(void) {
> +int
> +main(void) {

unrelated noise
-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 --]

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

[-- 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:[~2009-08-13  4:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-03  2:20 [LTP] [PATCH] Fix compiler warnings for performance_counter tests Garrett Cooper
2009-08-13  4:36 ` Mike Frysinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.