PtokaX > Bugs

Ubuntu 18.04 compilation error

(1/1)

bastya_elvtars:

with or without SQLite support it throws this (Ubuntu installed within Windows 10):



--- Code: ---/home/szg/PtokaX/core/SettingManager.cpp: In member function ‘void SettingManager::Save()’:
/home/szg/PtokaX/core/SettingManager.cpp:507:28: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
      if(SetBoolCom[szi] != '\0') {
                            ^~~~
/home/szg/PtokaX/core/SettingManager.cpp:530:29: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
      if(SetShortCom[szi] != '\0') {
                             ^~~~
/home/szg/PtokaX/core/SettingManager.cpp:553:27: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
      if(SetTxtCom[szi] != '\0') {
                           ^~~~
/home/szg/PtokaX/core/SettingManager.cpp: In member function ‘void SettingManager::SetText(size_t, const char*, size_t)’:
/home/szg/PtokaX/core/SettingManager.cpp:1112:41: warning: this statement may fall through [-Wimplicit-fallthrough=]
             if(szLen == 0 || szLen > 64 || strpbrk(sTxt, " $|") != NULL) {
                                         ^
/home/szg/PtokaX/core/SettingManager.cpp:1115:9: note: here
         case SETTXT_TCP_PORTS:
         ^~~~
makefile-sqlite:331: recipe for target '/home/szg/PtokaX/obj/SettingManager.o' failed
make: *** [/home/szg/PtokaX/obj/SettingManager.o] Error 1
--- End code ---

PPK:
Fixes:
line 507:

--- Code: C++ ---if(SetBoolCom[szi][0] != '\0') {line 530:

--- Code: C++ ---if(SetShortCom[szi][0] != '\0') {line 553:

--- Code: C++ ---if(SetTxtCom[szi][0] != '\0') {line 1111 to 1115:

--- Code: C++ ---        case SETTXT_ADMIN_NICK:            if(szLen == 0 || szLen > 64 || strpbrk(sTxt, " $|") != NULL) {                return;            }            break;        case SETTXT_TCP_PORTS:

bastya_elvtars:
Thank you, that did the trick!  :)

Navigation

[0] Message Index

Go to full version