Changeset 945f31b9 in rtems


Ignore:
Timestamp:
Oct 13, 2014, 4:13:11 PM (5 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
635119b
Parents:
54560d3
Message:

nsecs/init.c: Use long to avoid overflow on 16-bit targets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/samples/nsecs/init.c

    r54560d3 r945f31b9  
    123123    struct timespec start, stop;
    124124    struct timespec diff;
    125     int j, max = (index * 10000);
     125    long j, max = (index * 10000L);
    126126    rtems_clock_get_uptime( &start );
    127127      for (j=0 ; j<max ; j++ )
     
    130130
    131131    subtract_em( &start, &stop, &diff );
    132     printf( "loop of %d %" PRIdtime_t ":%ld %" PRIdtime_t ":%ld --> %" PRIdtime_t ":%ld\n",
     132    printf( "loop of %ld %" PRIdtime_t
     133              ":%ld %" PRIdtime_t ":%ld --> %" PRIdtime_t ":%ld\n",
    133134      max,
    134135      start.tv_sec, start.tv_nsec,
Note: See TracChangeset for help on using the changeset viewer.