Print this page
11972 resync smatch

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/smatch/src/validation/backend/cast.c
          +++ new/usr/src/tools/smatch/src/validation/backend/cast.c
   1    1  typedef _Bool bool;
        2 +typedef   signed char schar;
   2    3  typedef unsigned char uchar;
   3    4  typedef unsigned short ushort;
   4    5  typedef unsigned int uint;
   5    6  typedef unsigned long ulong;
   6    7  typedef long long longlong;
   7    8  typedef unsigned long long ulonglong;
   8    9  
   9   10  #define DEFINE_CAST(from, to)                   \
  10   11          static to from##2##to(from x) {         \
  11   12                  return x;                       \
  12   13          }
  13   14  
  14   15  #define DEFINE_CASTS(from)                      \
  15   16          DEFINE_CAST(from, bool)                 \
  16   17          DEFINE_CAST(from, char)                 \
       18 +        DEFINE_CAST(from, schar)                \
  17   19          DEFINE_CAST(from, uchar)                \
  18   20          DEFINE_CAST(from, short)                \
  19   21          DEFINE_CAST(from, ushort)               \
  20   22          DEFINE_CAST(from, int)                  \
  21   23          DEFINE_CAST(from, uint)                 \
  22   24          DEFINE_CAST(from, long)                 \
  23   25          DEFINE_CAST(from, ulong)                \
  24   26          DEFINE_CAST(from, longlong)             \
  25   27          DEFINE_CAST(from, ulonglong)            \
  26      -/*
  27   28          DEFINE_CAST(from, float)                \
  28   29          DEFINE_CAST(from, double)
  29      -*/
  30   30  
  31   31  DEFINE_CASTS(bool)
  32   32  DEFINE_CASTS(char)
       33 +DEFINE_CASTS(schar)
  33   34  DEFINE_CASTS(uchar)
  34   35  DEFINE_CASTS(short)
  35   36  DEFINE_CASTS(ushort)
  36   37  DEFINE_CASTS(int)
  37   38  DEFINE_CASTS(uint)
  38   39  DEFINE_CASTS(long)
  39   40  DEFINE_CASTS(ulong)
  40   41  DEFINE_CASTS(longlong)
  41   42  DEFINE_CASTS(ulonglong)
  42      -/*
  43   43  DEFINE_CASTS(float)
  44   44  DEFINE_CASTS(double)
  45      -*/
  46   45  
  47   46  /*
  48   47   * check-name: Cast code generation
  49   48   * check-command: sparsec -c $file -o tmp.o
  50   49   */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX