[Bug 1644] New: testsuites/tmtests/tm30/../../support/src/tmtests_support.c:46:3: warning: format '%d' expects type 'int', but argument 4 has type 'long int'

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Fri Jul 30 05:44:01 UTC 2010


https://www.rtems.org/bugzilla/show_bug.cgi?id=1644

           Summary: testsuites/tmtests/tm30/../../support/src/tmtests_supp
                    ort.c:46:3: warning: format '%d' expects type 'int',
                    but argument 4 has type 'long int'
           Product: RTEMS
           Version: HEAD
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: misc
        AssignedTo: joel.sherrill at oarcorp.com
        ReportedBy: ralf.corsepius at rtems.org


# sparc64-rtems4.11-gcc -B../../../../../usiii/lib/ -specs bsp_specs -qrtems
-DPACKAGE_NAME=\"rtems-c-src-tests-tmtests\"
-DPACKAGE_TARNAME=\"rtems-c-src-tests-tmtests\" -DPACKAGE_VERSION=\"4.10.99.0\"
-DPACKAGE_STRING=\"rtems-c-src-tests-tmtests\ 4.10.99.0\"
-DPACKAGE_BUGREPORT=\"http://www.rtems.org/bugzilla\" -DPACKAGE_URL=\"\"
-DRTEMS_TEST_NO_PAUSE=1 -I.
-I../../../../../../../c/src/../../testsuites/tmtests/tm30 
-I../../../../../../../c/src/../../testsuites/tmtests/include
-DOPERATION_COUNT=100
-I../../../../../../../c/src/../../testsuites/tmtests/../support/include  
-mcpu=ultrasparc3 -DUS3 -DSUN4U -gstabs -Wall -Wimplicit-function-declaration
-Wstrict-prototypes -Wnested-externs -MT tmtests_support.o -MD -MP -MF
.deps/tmtests_support.Tpo -c -o tmtests_support.o `test -f
'../../support/src/tmtests_support.c' || echo
'../../../../../../../c/src/../../testsuites/tmtests/tm30/'`../../support/src/tmtests_support.c
../../../../../../../c/src/../../testsuites/tmtests/tm30/../../support/src/tmtests_support.c:
In function 'rtems_time_test_measure_operation':
../../../../../../../c/src/../../testsuites/tmtests/tm30/../../support/src/tmtests_support.c:46:3:
warning: format '%d' expects type 'int', but argument 4 has type 'long int'

AFAIS, this warning originates from this change:

--- tmtests_support.c    21 Jun 2010 16:54:17 -0000    1.1
+++ tmtests_support.c    25 Jun 2010 16:59:06 -0000    1.2
@@ -6,7 +6,7 @@
  *  found in the file LICENSE in this distribution or at
  *  http://www.rtems.com/license/LICENSE.
  *
- *  $Id: tmtests_support.c,v 1.1 2010/06/21 16:54:17 joel Exp $
+ *  $Id: tmtests_support.c,v 1.2 2010/06/25 16:59:06 joel Exp $
  */

 #include <bsp.h>
@@ -27,9 +27,9 @@
   int                       overhead
 )
 {
-  int i;
-  int loop_overhead;
-  int end_time;
+  int  i;
+  long loop_overhead;
+  int  end_time;

   benchmark_timer_initialize();
     for (i=0 ; i<iterations ; i++ ) {


This causes an fprintf format string mismatch in put_time (uses PRId32, i.e.
expects a 32bit type) on 64bit targets.

=> either put_time needs to be changed or 
this "long" be replaced with a 32bit type.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list