MEKA
Discord: mekaprojects
Site yetkilisi
Süper Moderatör
Premium Üye
Grafiker
Geliştirici
Yardımsever Üye
- Mesaj
- 2.793
- Çözümler
- 287
- Beğeni
- 2.053
- Puan
- 1.850
- Ticaret Puanı
- 2
Takıldığım bu warningler var bunların çözümleri var mı ? (Makefile ile gizlemek istemiyorum.)
Kod:
DragonSoul.cpp: In member function 'bool DSManager::DoRefineGrade(LPCHARACTER, TItemPos (&)[15])':
DragonSoul.cpp:510:11: warning: the compiler can assume that the address of 'aItemPoses' will never be NULL [-Waddress]
510 | if (NULL == aItemPoses)
| ^
DragonSoul.cpp: In member function 'bool DSManager::DoRefineStep(LPCHARACTER, TItemPos (&)[15])':
DragonSoul.cpp:670:11: warning: the compiler can assume that the address of 'aItemPoses' will never be NULL [-Waddress]
670 | if (NULL == aItemPoses)
| ^
DragonSoul.cpp: In member function 'bool DSManager::DoRefineStrength(LPCHARACTER, TItemPos (&)[15])':
DragonSoul.cpp:831:11: warning: the compiler can assume that the address of 'aItemPoses' will never be NULL [-Waddress]
831 | if (NULL == aItemPoses)
| ^
DragonSoul.cpp: In member function 'bool DSManager::DoRefineGrade(LPCHARACTER, TItemPos (&)[15])':
DragonSoul.cpp:510:2: warning: 'nonnull' argument 'aItemPoses' compared to NULL [-Wnonnull-compare]
510 | if (NULL == aItemPoses)
| ^~
DragonSoul.cpp: In member function 'bool DSManager::DoRefineStep(LPCHARACTER, TItemPos (&)[15])':
DragonSoul.cpp:670:2: warning: 'nonnull' argument 'aItemPoses' compared to NULL [-Wnonnull-compare]
670 | if (NULL == aItemPoses)
| ^~
DragonSoul.cpp: In member function 'bool DSManager::DoRefineStrength(LPCHARACTER, TItemPos (&)[15])':
DragonSoul.cpp:831:2: warning: 'nonnull' argument 'aItemPoses' compared to NULL [-Wnonnull-compare]
831 | if (NULL == aItemPoses)
| ^~
Kod:
panama.cpp: In function 'size_t PanamaLoad()':
panama.cpp:26:56: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size 249 [-Wformat-truncation=]
26 | snprintf(szIVFileName, sizeof(szIVFileName), "panama/%s", szIVFileNameConfig);
| ^~ ~~~~~~~~~~~~~~~~~~
panama.cpp:26:11: note: 'snprintf' output between 8 and 263 bytes into a destination of size 256
26 | snprintf(szIVFileName, sizeof(szIVFileName), "panama/%s", szIVFileNameConfig);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kod:
ProtoReader.cpp: In function 'int get_Item_SubType_Value(int, std::string)':
ProtoReader.cpp:314:29: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
314 | assert(_countof(arSubType) > type_value && "Subtype rule: Out of range!!");
ProtoReader.cpp:316:26: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
316 | if (_countof(arSubType) <= type_value)
Kod:
ClientManager.cpp: In member function 'void CClientManager::MainLoop()':
ClientManager.cpp:236:3: warning: deleting object of polymorphic class type 'CItemPriceListTableCache' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
236 | delete pCache;
| ^~~~~~~~~~~~~
ClientManager.cpp: In member function 'int CClientManager::Process()':
ClientManager.cpp:2985:64: warning: '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context]
2985 | if (!(thecore_heart->pulse % thecore_heart->passes_per_sec * 10))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
Kod:
In file included from ../../common/singleton.h:4,
from stdafx.h:15,
from ProtoReader.cpp:1:
ProtoReader.cpp: In function 'int get_Item_SubType_Value(int, std::string)':
ProtoReader.cpp:313:29: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
313 | assert(_countof(arSubType) > type_value && "Subtype rule: Out of range!!");
ProtoReader.cpp:315:26: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
315 | if (_countof(arSubType) <= type_value)
Kod:
Cache.cpp: In member function 'virtual void CItemCache::OnFlush()':
Cache.cpp:142:79: warning: '%s' directive output may be truncated writing up to 8191 bytes into a region of size between 8165 and 16356 [-Wformat-truncation=]
142 | snprintf(szItemQuery, sizeof(szItemQuery), "REPLACE INTO item%s (%s) VALUES(%s)", GetTablePostfix(), szColumns, szValues);
| ^~ ~~~~~~~~
Cache.cpp:142:11: note: 'snprintf' output 30 or more bytes (assuming 16412) into a destination of size 16384
142 | snprintf(szItemQuery, sizeof(szItemQuery), "REPLACE INTO item%s (%s) VALUES(%s)", GetTablePostfix(), szColumns, szValues);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Son düzenleme: