Changeset c0ffdee in rtems


Ignore:
Timestamp:
Jul 3, 2000, 3:20:57 PM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
feb93ede
Parents:
3af0828
Message:

Patch rtems-rc-20000702-1.diff from Ralf Corsepius <corsepiu@…>
that is a hack to workaround a switch generation compiler bug for the
SH2 and cleaned up some warnings.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/tests/libtests/termios/init.c

    r3af0828 rc0ffdee  
    237237void print_c_cflag( struct termios * tp )
    238238{
    239   int baud;
     239  unsigned int baud;
    240240 
    241241  printf( "c_cflag = 0x%08x\n", tp->c_cflag );
    242  
    243   switch( baud = (tp->c_cflag & CBAUD) ) {
     242
     243  baud = (tp->c_cflag & CBAUD) ;
     244#if defined(__sh2__)
     245  if ( tp->c_cflag & CBAUDEX )
     246#endif
     247  switch( baud ) {
    244248    case B0:
    245249      printf( "\tCBAUD =\tB0\n" );
     
    305309      printf( "\tCBAUD =\tB38400\n" );
    306310      break;
    307      
     311#if defined(__sh2__)
     312    }
     313    else
     314    switch ( baud )
     315    {
     316#endif
    308317    case B57600:
    309318      printf( "\tCBAUD =\tB57600\n" );
     
    589598void canonical_input( struct termios *tp )
    590599{
    591     char buffer[256];
    592     char c, first_time = TRUE;
     600  char c, first_time = TRUE;
    593601   
    594602  printf( "\nTesting canonical input\n\n" );
     
    711719Init (rtems_task_argument ignored)
    712720{
    713   char c, done;
     721  char c ;
    714722  struct termios orig_termios, test_termios;
    715723 
  • testsuites/libtests/termios/init.c

    r3af0828 rc0ffdee  
    237237void print_c_cflag( struct termios * tp )
    238238{
    239   int baud;
     239  unsigned int baud;
    240240 
    241241  printf( "c_cflag = 0x%08x\n", tp->c_cflag );
    242  
    243   switch( baud = (tp->c_cflag & CBAUD) ) {
     242
     243  baud = (tp->c_cflag & CBAUD) ;
     244#if defined(__sh2__)
     245  if ( tp->c_cflag & CBAUDEX )
     246#endif
     247  switch( baud ) {
    244248    case B0:
    245249      printf( "\tCBAUD =\tB0\n" );
     
    305309      printf( "\tCBAUD =\tB38400\n" );
    306310      break;
    307      
     311#if defined(__sh2__)
     312    }
     313    else
     314    switch ( baud )
     315    {
     316#endif
    308317    case B57600:
    309318      printf( "\tCBAUD =\tB57600\n" );
     
    589598void canonical_input( struct termios *tp )
    590599{
    591     char buffer[256];
    592     char c, first_time = TRUE;
     600  char c, first_time = TRUE;
    593601   
    594602  printf( "\nTesting canonical input\n\n" );
     
    711719Init (rtems_task_argument ignored)
    712720{
    713   char c, done;
     721  char c ;
    714722  struct termios orig_termios, test_termios;
    715723 
Note: See TracChangeset for help on using the changeset viewer.