Fix FTBFS on opensuse TW: formula.cc:294:1: error: narrowing conversion of '128' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] #8

Closed
Francois wants to merge 1 commits from <deleted>:r14.0.x into r14.0.x
Francois commented 2 years ago
Collaborator

Fix FTBFS on opensuse Tumbleweed

[ 1728s] In file included from libqpro_la.all_cc.cc:2:
[ 1728s] formula.cc:294:1: error: narrowing conversion of '128' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s]   294 | };
[ 1728s]       | ^
[ 1728s] formula.cc:294:1: error: narrowing conversion of '129' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '130' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '131' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '132' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '133' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '134' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '135' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '136' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '137' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '138' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '139' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '140' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '141' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '142' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '143' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '144' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '145' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '154' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '157' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '158' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '159' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '160' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] formula.cc:294:1: error: narrowing conversion of '161' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing]
[ 1728s] In file included from libqpro_la.all_cc.cc:5:
[ 1728s] stream.cc: In constructor 'QpIStream::QpIStream(unsigned char*, unsigned int)':
[ 1728s] stream.cc:59:59: warning: unused parameter 'pLen' [-Wunused-parameter]
[ 1728s]    59 | QpIStream::QpIStream(unsigned char* pBuffer, unsigned int pLen)
[ 1728s]       |                                              ~~~~~~~~~~~~~^~~~
[ 1728s] make[6]: *** [Makefile:673: libqpro_la.all_cc.lo] Error 1
Fix FTBFS on opensuse Tumbleweed ``` [ 1728s] In file included from libqpro_la.all_cc.cc:2: [ 1728s] formula.cc:294:1: error: narrowing conversion of '128' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] 294 | }; [ 1728s] | ^ [ 1728s] formula.cc:294:1: error: narrowing conversion of '129' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '130' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '131' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '132' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '133' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '134' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '135' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '136' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '137' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '138' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '139' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '140' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '141' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '142' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '143' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '144' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '145' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '154' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '157' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '158' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '159' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '160' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] formula.cc:294:1: error: narrowing conversion of '161' from 'int' to 'TQP_INT8' {aka 'char'} [-Wnarrowing] [ 1728s] In file included from libqpro_la.all_cc.cc:5: [ 1728s] stream.cc: In constructor 'QpIStream::QpIStream(unsigned char*, unsigned int)': [ 1728s] stream.cc:59:59: warning: unused parameter 'pLen' [-Wunused-parameter] [ 1728s] 59 | QpIStream::QpIStream(unsigned char* pBuffer, unsigned int pLen) [ 1728s] | ~~~~~~~~~~~~~^~~~ [ 1728s] make[6]: *** [Makefile:673: libqpro_la.all_cc.lo] Error 1 ```
Owner

François, thank you for your first pull-request! Here are some notes:

  1. You forgot to use the -s option during commit to get your Signed-off-by. This is to confirm your agreement with DCO.
  2. If the code is not specific to the R14.0.x branch, the patches should always be primarily for the master branch. Then we use git cherry-pick for r14.0.x branch.
  3. Instead of using forks, we prefer pushing into branches on main repositories – see shared collaboration with branches model, as shown on the TGW wiki page. This prevents unnecessary dead forks, as you can see in the example on tdebase.
François, thank you for your first pull-request! Here are some notes: 1. You forgot to use the `-s` option during commit to get your `Signed-off-by`. This is to confirm your agreement with [**DCO**](https://developercertificate.org/). 2. If the code is not specific to the R14.0.x branch, the patches should always be primarily for the master branch. Then we use git cherry-pick for r14.0.x branch. 3. Instead of using forks, we prefer pushing into branches on main repositories – see shared collaboration with branches model, as shown on the [TGW wiki page](https://wiki.trinitydesktop.org/TDE_Gitea_Workspace#To_contribute_code_changes). This prevents unnecessary dead forks, as you can see in the example on [tdebase](../../Fat-Zer/tdebase).
SlavekB reviewed 2 years ago
SlavekB left a comment
Owner

The code looks good, however there is at least a need to add Signed-Off-by. See notes above.

The code looks good, however there is at least a need to add Signed-Off-by. See notes above.
Francois closed this pull request 2 years ago
Owner

Has been replaced with #9.

Has been replaced with #9.
This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.