Jump to content

Recommended Posts

  • Active+ Member

Hi everyone, wish you all a great day.
I upgraded my source code to Clang 14 / C++2b following Mali's guide. With the new Clang / c++ version, a lot of warnings have emerged while building the game and db. And I am here to ask your help because I don't know how to code and mr. google didn't help at all ?
 

These are the new warnings that came with the new Clang / c++ while building game:

-Wdeprecated-enum-enum-conversion
-Winvalid-source-encoding
-Wunused-private-field
-Wambiguous-reversed-operator
-Wmisleading-indentation
-Wunused-const-variable
-W#pragma-messages
-Wdeprecated
-Wdeprecated-anon-enum-enum-conversion

These are the new warnings that came with the new Clang / c++ while building db:

-Winvalid-source-encoding
-Wunused-const-variable
-Wtautological-pointer-compare
-Wdeprecated-enum-enum-conversion
-Wunused-private-field

I had to suppress -Winvalid-source-encoding warnings since they were literally spamming on the console. Every single file with Korean characters throw this error now. I tried to change the encodings of those files to UTF-8 from EUC-KR, and it really got rid of the warnings, however, after that the game didn't start. It gave an error like:

"ReadSpecialDropItemFile: ReadSpecialDropItemFile : there is no item 돈꾸러미 : node 금장보물상자"

Another almost spamming warning is the -Wdeprecated-enum-enum-conversion one. For example it throws this error

./../../common/item_length.h:154:46: warning: arithmetic between different enumeration types ('EDragonSoulSubType' and 'EDragonSoulGradeTypes') is deprecated [-Wdeprecated-enum-enum-conversion]
        DRAGON_SOUL_INVENTORY_MAX_NUM = DS_SLOT_MAX * DRAGON_SOUL_GRADE_MAX * DRAGON_SOUL_BOX_SIZE,
                                        ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~

for this code

enum EDSInventoryMaxNum
{
	DRAGON_SOUL_INVENTORY_MAX_NUM = DS_SLOT_MAX * DRAGON_SOUL_GRADE_MAX * DRAGON_SOUL_BOX_SIZE,
};

 

Here are the full logs while building my game and db. I am pretty much using almost vanilla novaline as base.

Game build log:
https://pastebin.com/hpd3pwk2

Db build log:

https://pastebin.com/fFdwrACt

Thank you very much in advance!

Edited by Debloat
clarity
Link to comment
https://metin2.dev/topic/28723-clang-14-c2b-how-to-fix-new-build-warnings/
Share on other sites

  • 3 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.