File papi-codecleanup.patch of Package papi
Index: src/libpfm-3.y/lib/pfmlib_gen_ia32.c
===================================================================
--- src/libpfm-3.y/lib/pfmlib_gen_ia32.c.orig
+++ src/libpfm-3.y/lib/pfmlib_gen_ia32.c
@@ -257,7 +257,7 @@ pfm_gen_ia32_init(void)
unsigned int val;
pmu_eax_t eax;
pmu_edx_t edx;
- } eax, ecx, edx, ebx;
+ } eax = { 0 }, ecx = { 0 }, edx = { 0 }, ebx = { 0 };
unsigned int num_cnt, i;
int ret;
Index: src/ctests/mendes-alt.c
===================================================================
--- src/ctests/mendes-alt.c.orig
+++ src/ctests/mendes-alt.c
@@ -18,14 +18,13 @@ static int EventSet = PAPI_NULL;
extern int TESTS_QUIET; /* Declared in test_utils.c */
-int
-main( argc, argv )
-int argc;
-char *argv[];
+void funcX(double a[MAX], double b[MAX], int n);
+void funcA(double a[MAX], double b[MAX], int n);
+
+int main(int argc, char *argv[])
{
int i, retval;
double a[MAX], b[MAX];
- void funcX( ), funcA( );
tests_quiet( argc, argv ); /* Set TESTS_QUIET variable */
@@ -158,10 +157,7 @@ char *argv[];
exit( 1 );
}
-void
-funcX( a, b, n )
-double a[MAX], b[MAX];
-int n;
+void funcX(double a[MAX], double b[MAX], int n)
{
int i, k;
for ( k = 0; k < TIMES; k++ )
@@ -169,10 +165,7 @@ int n;
a[i] = a[i] * b[i] + 1.;
}
-void
-funcA( a, b, n )
-double a[MAX], b[MAX];
-int n;
+void funcA(double a[MAX], double b[MAX], int n)
{
int i, k;
double t[MAX];