Tdesktop: More GCC 7.x build errors

Created on 30 Mar 2017  路  7Comments  路  Source: telegramdesktop/tdesktop

Steps to reproduce

  1. Try to build tag 1.0.26 under GCC 7.


    1. 3.

Expected behaviour

Successful build.

Actual behaviour

Build failure:

[ 59%] Building CXX object CMakeFiles/Telegram.dir/builddir/build/BUILD/tdesktop-1.0.26/Telegram/SourceFiles/ui/text/text.o
/builddir/build/BUILD/tdesktop-1.0.26/Telegram/SourceFiles/ui/text/text.cpp: In member function 'bool TextPainter::eBidiItemize(QScriptAnalysis*, {anonymous}::BidiControl&)':
/builddir/build/BUILD/tdesktop-1.0.26/Telegram/SourceFiles/ui/text/text.cpp:2136:38: error: this statement may fall through [-Werror=implicit-fallthrough=]
        if(status.eor == QChar::DirEN || dir == QChar::DirAN) {
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/builddir/build/BUILD/tdesktop-1.0.26/Telegram/SourceFiles/ui/text/text.cpp:2139:7: note: here
       case QChar::DirBN:
       ^~~~
/builddir/build/BUILD/tdesktop-1.0.26/Telegram/SourceFiles/ui/text/text.cpp:2193:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
       if(status.eor == QChar::DirAN) {
       ^~
/builddir/build/BUILD/tdesktop-1.0.26/Telegram/SourceFiles/ui/text/text.cpp:2196:6: note: here
      case QChar::DirES:
      ^~~~
/builddir/build/BUILD/tdesktop-1.0.26/Telegram/SourceFiles/ui/text/text.cpp:2104:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
     if(status.lastStrong != QChar::DirAL) {
     ^~
/builddir/build/BUILD/tdesktop-1.0.26/Telegram/SourceFiles/ui/text/text.cpp:2173:4: note: here
    case QChar::DirAN:
    ^~~~
cc1plus: all warnings being treated as errors

Configuration

Operating system: Fedora 26+

Version of Telegram Desktop: 1.0.26

Used theme: default

build

Most helpful comment

I daresay it's better to remove -Werror flag.

Ofc, I know and already done for our Fedora package. But this warnings later will be treated as errors even without -Werror flag and need to be fixed.

All 7 comments

duplicate

No. You are wrong.

It is not a duplicate, but those are not real errors, but GCC 7 specific warnings, so I'm not sure when I'll fix them.

@john-preston if it is expected (fallthrough), then you should just add comment into the source code:

/* FALLTHROUGH */

@ignatenkobrain But right now I can add some comments or attributes to silence the warnings to this place and find out that some another place with a fallthrough fires a warning, it is impractical. If a pull request with all the required fixes for GCC 7 build support without breaking any current build will be suggested I'll merge it.

I daresay it's better to remove -Werror flag.

I daresay it's better to remove -Werror flag.

Ofc, I know and already done for our Fedora package. But this warnings later will be treated as errors even without -Werror flag and need to be fixed.

Please, update this issue against telegram-desktop 1.3.0 or newer.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

slowaways picture slowaways  路  3Comments

Justinzobel picture Justinzobel  路  3Comments

FunctionalHacker picture FunctionalHacker  路  3Comments

JhonSane picture JhonSane  路  3Comments

luisalvarado picture luisalvarado  路  3Comments