../../../../../chalk/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cpp:243:40: error: non-constant-expression cannot be narrowed from type 'int' to 'TQ_UINT8' (aka 'unsigned char') in initializer list [-Wc++11-narrowing]
TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness};
^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../chalk/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cpp:243:40: note: insert an explicit cast to silence this issue
TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness};
^~~~~~~~~~~~~~~~~~~~~~~~~~~
static_cast<TQ_UINT8>( )
Each error message is followed by the 'note: insert an explicit cast ..' message
../../../../../chalk/plugins/filters/colorsfilters/kis_perchannel_filter.cpp:257:40: error: non-constant-expression cannot be narrowed from type 'int' to 'TQ_UINT8' (aka 'unsigned char') in initializer list [-Wc++11-narrowing]
TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness};
^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../chalk/plugins/filters/colorsfilters/colorsfilters.cpp:212:40: error: non-constant-expression cannot be narrowed from type 'int' to 'TQ_UINT8' (aka 'unsigned char') in initializer list [-Wc++11-narrowing]
TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness};
^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../chalk/plugins/filters/colorsfilters/colorsfilters.cpp:306:40: error: non-constant-expression cannot be narrowed from type 'int' to 'TQ_UINT8' (aka 'unsigned char') in initializer list [-Wc++11-narrowing]
TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness};
^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../chalk/plugins/filters/levelfilter/kis_level_filter.cpp:198:40: error: non-constant-expression cannot be narrowed from type 'int' to 'TQ_UINT8' (aka 'unsigned char') in initializer list [-Wc++11-narrowing]
TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness};
^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../filters/kspread/excel/sidewinder/cell.cpp:120:25: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'char' in initializer list [-Wc++11-narrowing]
char buf[3] = { 'A'+(d/26), 'A'+(d%26), 0};
^~~~~~~~~~
../../../../../filters/kspread/excel/sidewinder/cell.cpp:120:37: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'char' in initializer list [-Wc++11-narrowing]
char buf[3] = { 'A'+(d/26), 'A'+(d%26), 0};
^~~~~~~~~~
../../../../../filters/kword/rtf/import/rtfimport.cpp:1270:22: error: non-constant-expression cannot be narrowed from type 'int' to 'char' in initializer list [-Wc++11-narrowing]
char tmpch[2] = {token.value, '\0'};
^~~~~~~~~~~
```
../../../../../chalk/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cpp:243:40: error: non-constant-expression cannot be narrowed from type 'int' to 'TQ_UINT8' (aka 'unsigned char') in initializer list [-Wc++11-narrowing]
TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness};
^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../chalk/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cpp:243:40: note: insert an explicit cast to silence this issue
TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness};
^~~~~~~~~~~~~~~~~~~~~~~~~~~
static_cast<TQ_UINT8>( )
```
Each error message is followed by the 'note: insert an explicit cast ..' message
```
../../../../../chalk/plugins/filters/colorsfilters/kis_perchannel_filter.cpp:257:40: error: non-constant-expression cannot be narrowed from type 'int' to 'TQ_UINT8' (aka 'unsigned char') in initializer list [-Wc++11-narrowing]
TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness};
^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
```
../../../../../chalk/plugins/filters/colorsfilters/colorsfilters.cpp:212:40: error: non-constant-expression cannot be narrowed from type 'int' to 'TQ_UINT8' (aka 'unsigned char') in initializer list [-Wc++11-narrowing]
TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness};
^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../chalk/plugins/filters/colorsfilters/colorsfilters.cpp:306:40: error: non-constant-expression cannot be narrowed from type 'int' to 'TQ_UINT8' (aka 'unsigned char') in initializer list [-Wc++11-narrowing]
TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness};
^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
```
../../../../../chalk/plugins/filters/levelfilter/kis_level_filter.cpp:198:40: error: non-constant-expression cannot be narrowed from type 'int' to 'TQ_UINT8' (aka 'unsigned char') in initializer list [-Wc++11-narrowing]
TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness};
^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
```
../../../../../filters/kspread/excel/sidewinder/cell.cpp:120:25: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'char' in initializer list [-Wc++11-narrowing]
char buf[3] = { 'A'+(d/26), 'A'+(d%26), 0};
^~~~~~~~~~
../../../../../filters/kspread/excel/sidewinder/cell.cpp:120:37: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'char' in initializer list [-Wc++11-narrowing]
char buf[3] = { 'A'+(d/26), 'A'+(d%26), 0};
^~~~~~~~~~
```
```
../../../../../filters/kword/rtf/import/rtfimport.cpp:1270:22: error: non-constant-expression cannot be narrowed from type 'int' to 'char' in initializer list [-Wc++11-narrowing]
char tmpch[2] = {token.value, '\0'};
^~~~~~~~~~~
```
Works ok for the patches included, but the rtf issue hasn't been addressed.
I changed rtfimport.cpp:1270 to char tmpch[2] = {(char)(token.value), '\0'};
and the build completed.
Works ok for the patches included, but the rtf issue hasn't been addressed.
I changed rtfimport.cpp:1270 to
`char tmpch[2] = {(char)(token.value), '\0'};`
and the build completed.
Each error message is followed by the 'note: insert an explicit cast ..' message
@Ray-V
could you test PR #26?
Works ok for the patches included, but the rtf issue hasn't been addressed.
I changed rtfimport.cpp:1270 to
char tmpch[2] = {(char)(token.value), '\0'};
and the build completed.
Interesting, I didn't have that error report. Anyway I will amend accordingly and merge. Thanks for testing.
Amended, merged and backported.