Jump to content
For maintenance and updates, the community will be offline on 31 December 2022 ×
  • 0

Clang 14 / C++2b how to fix new build warnings?


Debloat

Question

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
Share on other sites

  • Answers 0
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

Popular Days

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Activity

    1. 1

      Looking for a good designer

    2. 2

      Where are those maps/dungeons coming from?

    3. 3

      Press F10 to close the client immediately

    4. 2

      Where are those maps/dungeons coming from?

    5. 2

      Where are those maps/dungeons coming from?

    6. 4

      Visual studio 2022 compiling issue

    7. 1

      Count players function

    8. 64
  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.