Browse Source

Make phoneme properties unsigned

Fixes two sanitizer warnings:

```
src/libespeak-ng/compiledata.c:2291:27: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
src/libespeak-ng/compiledata.c:2424:34: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
```
master
Sascha Brawer 7 years ago
parent
commit
8aa4521d31
1 changed files with 17 additions and 17 deletions
  1. 17
    17
      src/libespeak-ng/phoneme.h

+ 17
- 17
src/libespeak-ng/phoneme.h View File

@@ -177,23 +177,23 @@ phoneme_feature_t phoneme_feature_from_string(const char *feature);
#define phFLAGBIT_LOCAL 31 // used during compilation

// phoneme properties
#define phUNSTRESSED (1 << phFLAGBIT_UNSTRESSED)
#define phVOICELESS (1 << phFLAGBIT_VOICELESS)
#define phVOICED (1 << phFLAGBIT_VOICED)
#define phSIBILANT (1 << phFLAGBIT_SIBILANT)
#define phNOLINK (1 << phFLAGBIT_NOLINK)
#define phTRILL (1 << phFLAGBIT_TRILL)
#define phPALATAL (1 << phFLAGBIT_PALATAL)
#define phBRKAFTER (1 << phFLAGBIT_BRKAFTER)
#define phNONSYLLABIC (1 << phFLAGBIT_NONSYLLABIC)
#define phLONG (1 << phFLAGBIT_LONG)
#define phLENGTHENSTOP (1 << phFLAGBIT_LENGTHENSTOP)
#define phRHOTIC (1 << phFLAGBIT_RHOTIC)
#define phNOPAUSE (1 << phFLAGBIT_NOPAUSE)
#define phPREVOICE (1 << phFLAGBIT_PREVOICE)
#define phFLAG1 (1 << phFLAGBIT_FLAG1)
#define phFLAG2 (1 << phFLAGBIT_FLAG2)
#define phLOCAL (1 << phFLAGBIT_LOCAL)
#define phUNSTRESSED (1U << phFLAGBIT_UNSTRESSED)
#define phVOICELESS (1U << phFLAGBIT_VOICELESS)
#define phVOICED (1U << phFLAGBIT_VOICED)
#define phSIBILANT (1U << phFLAGBIT_SIBILANT)
#define phNOLINK (1U << phFLAGBIT_NOLINK)
#define phTRILL (1U << phFLAGBIT_TRILL)
#define phPALATAL (1U << phFLAGBIT_PALATAL)
#define phBRKAFTER (1U << phFLAGBIT_BRKAFTER)
#define phNONSYLLABIC (1U << phFLAGBIT_NONSYLLABIC)
#define phLONG (1U << phFLAGBIT_LONG)
#define phLENGTHENSTOP (1U << phFLAGBIT_LENGTHENSTOP)
#define phRHOTIC (1U << phFLAGBIT_RHOTIC)
#define phNOPAUSE (1U << phFLAGBIT_NOPAUSE)
#define phPREVOICE (1U << phFLAGBIT_PREVOICE)
#define phFLAG1 (1U << phFLAGBIT_FLAG1)
#define phFLAG2 (1U << phFLAGBIT_FLAG2)
#define phLOCAL (1U << phFLAGBIT_LOCAL)

// fixed phoneme code numbers, these can be used from the program code
#define phonCONTROL 1

Loading…
Cancel
Save