Changeset 8b1c1ae in rtems


Ignore:
Timestamp:
08/08/96 16:53:32 (28 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
567ac45
Parents:
66e519c1
Message:

print_current_time: added leading underscore to variables allocated
inside macros.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/tests/psxtests/include/pmacros.h

    r66e519c1 r8b1c1ae  
    6666#define print_current_time(s1, s2) \
    6767  do { \
    68     char buffer[32]; \
    69     int  status; \
    70     struct timespec tv; \
     68    char _buffer[32]; \
     69    int  _status; \
     70    struct timespec _tv; \
    7171    \
    72     status = clock_gettime( CLOCK_REALTIME, &tv ); \
    73     assert( !status ); \
     72    _status = clock_gettime( CLOCK_REALTIME, &_tv ); \
     73    assert( !_status ); \
    7474    \
    75     (void) ctime_r( &tv.tv_sec, buffer ); \
    76     buffer[ strlen( buffer ) - 1 ] = 0; \
    77     printf( "%s%s%s\n", s1, buffer, s2 ); \
     75    (void) ctime_r( &_tv.tv_sec, _buffer ); \
     76    _buffer[ strlen( _buffer ) - 1 ] = 0; \
     77    printf( "%s%s%s\n", s1, _buffer, s2 ); \
    7878    fflush(stdout); \
    7979  } while ( 0 )
  • c/src/tests/psxtests/support/include/pmacros.h

    r66e519c1 r8b1c1ae  
    6666#define print_current_time(s1, s2) \
    6767  do { \
    68     char buffer[32]; \
    69     int  status; \
    70     struct timespec tv; \
     68    char _buffer[32]; \
     69    int  _status; \
     70    struct timespec _tv; \
    7171    \
    72     status = clock_gettime( CLOCK_REALTIME, &tv ); \
    73     assert( !status ); \
     72    _status = clock_gettime( CLOCK_REALTIME, &_tv ); \
     73    assert( !_status ); \
    7474    \
    75     (void) ctime_r( &tv.tv_sec, buffer ); \
    76     buffer[ strlen( buffer ) - 1 ] = 0; \
    77     printf( "%s%s%s\n", s1, buffer, s2 ); \
     75    (void) ctime_r( &_tv.tv_sec, _buffer ); \
     76    _buffer[ strlen( _buffer ) - 1 ] = 0; \
     77    printf( "%s%s%s\n", s1, _buffer, s2 ); \
    7878    fflush(stdout); \
    7979  } while ( 0 )
  • testsuites/psxtests/include/pmacros.h

    r66e519c1 r8b1c1ae  
    6666#define print_current_time(s1, s2) \
    6767  do { \
    68     char buffer[32]; \
    69     int  status; \
    70     struct timespec tv; \
     68    char _buffer[32]; \
     69    int  _status; \
     70    struct timespec _tv; \
    7171    \
    72     status = clock_gettime( CLOCK_REALTIME, &tv ); \
    73     assert( !status ); \
     72    _status = clock_gettime( CLOCK_REALTIME, &_tv ); \
     73    assert( !_status ); \
    7474    \
    75     (void) ctime_r( &tv.tv_sec, buffer ); \
    76     buffer[ strlen( buffer ) - 1 ] = 0; \
    77     printf( "%s%s%s\n", s1, buffer, s2 ); \
     75    (void) ctime_r( &_tv.tv_sec, _buffer ); \
     76    _buffer[ strlen( _buffer ) - 1 ] = 0; \
     77    printf( "%s%s%s\n", s1, _buffer, s2 ); \
    7878    fflush(stdout); \
    7979  } while ( 0 )
Note: See TracChangeset for help on using the changeset viewer.