Page MenuHomeWildfire Games

Fix 4500 gcc 8, gcc 9 compile warnings
ClosedPublic

Authored by elexis on Jul 8 2019, 4:22 AM.

Details

Summary

It is impossible to code with recent gcc because there are more than 4500 compile warnings burying any information referring to ones local diff.

   1 -Warray-bounds
   1 -Waligned-new=
   2 -Wcast-function-type
   3 -Wcatch-value=
   3 -Wclass-memaccess
4496 -Wdeprecated-copy
   1 -Wmaybe-uninitialized
   1 -Wstringop-truncation
   2 -Wunused-but-set-variable
   1 -Wunused-parameter


The Atlas COMANND macro and the Path.h warning make up 4375 of the 4496 -Wdeprecated-copy warnings.
The complete buildlog spam is attached.
One example for the path:

In file included from ../../../source/lib/file/vfs/vfs_path.h:26,
                 from ../../../source/scriptinterface/ScriptInterface.h:21,
                 from ../../../source/simulation2/helpers/SimulationCommand.h:21,
                 from ../../../source/simulation2/system/TurnManager.h:21,
                 from ../../../source/network/NetClientTurnManager.h:21,
                 from ../../../source/network/NetClient.cpp:22:
../../../source/lib/path.h: In member function ‘Path Path::Basename() const’:
../../../source/lib/path.h:197:11: warning: implicitly-declared ‘Path::Path(const Path&)’ is deprecated [-Wdeprecated-copy]
  197 |    return filename;
      |           ^~~~~~~~
../../../source/lib/path.h:113:8: note: because ‘Path’ has user-provided ‘Path& Path::operator=(const Path&)’
  113 |  Path& operator=(const Path& rhs)
      |        ^~~~~~~~
../../../source/lib/path.h: In member function ‘Path Path::operator/(Path) const’:
../../../source/lib/path.h:218:15: warning: implicitly-declared ‘Path::Path(const Path&)’ is deprecated [-Wdeprecated-copy]
  218 |   Path ret = *this;

One example for the Atlas COMMAND:

In file included from ../../../source/tools/atlas/GameInterface/Messages.h:22,
                 from ../../../source/tools/atlas/GameInterface/View.h:25,
                 from ../../../source/ps/GameSetup/GameSetup.cpp:89:
../../../source/tools/atlas/GameInterface/Messages.h: In constructor ‘AtlasMessage::mSetMapSettings::mSetMapSettings(const AtlasMessage::dSetMapSettings&)’:
../../../source/tools/atlas/GameInterface/MessagesSetup.h:99:31: warning: implicitly-declared ‘AtlasMessage::dSetMapSettings::dSetMapSettings(const AtlasMessage::dSetMapSettings&)’ is deprecated [-Wdeprecated-copy]
   99 |   m##t(const d##t& d) : d##t(d) {} \
      |                               ^
../../../source/tools/atlas/GameInterface/MessagesSetup.h:161:2: note: in expansion of macro ‘COMMANDSTRUCT’
  161 |  COMMANDSTRUCT(name, merge)
      |  ^~~~~~~~~~~~~
../../../source/tools/atlas/GameInterface/Messages.h:185:1: note: in expansion of macro ‘COMMAND’
  185 | COMMAND(SetMapSettings, MERGE,
      | ^~~~~~~
../../../source/tools/atlas/GameInterface/MessagesSetup.h:94:15: note: because ‘AtlasMessage::dSetMapSettings’ has user-provided ‘const AtlasMessage::dSetMapSettings& AtlasMessage::dSetMapSettings::operator=(const AtlasMessage::dSetMapSettings&)’
   94 |   const d##t& operator=(const d##t&); \
      |               ^~~~~~~~
../../../source/tools/atlas/GameInterface/MessagesSetup.h:94:15: note: in definition of macro ‘COMMANDDATASTRUCT’
   94 |   const d##t& operator=(const d##t&); \
      |               ^~~~~~~~
../../../source/tools/atlas/GameInterface/Messages.h:185:1: note: in expansion of macro ‘COMMAND’
  185 | COMMAND(SetMapSettings, MERGE,
      | ^~~~~~~

The fixed -Wcatch-value= warnings are:

/path/to/trunk/source/simulation2/tests/test_Serializer.h: In member function ‘void TestSerializer::test_bounds()’:
/path/to/trunk/source/simulation2/tests/test_Serializer.h:286:59: warning: catching polymorphic type ‘class PSERROR_Serialize_OutOfBounds’ by value [-Wcatch-value=]
  286 |   TS_ASSERT_THROWS(serialize.NumberI32("x", 17, -16, 16), PSERROR_Serialize_OutOfBounds);
      |                                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/path/to/trunk/source/simulation2/tests/test_Serializer.h:287:60: warning: catching polymorphic type ‘class PSERROR_Serialize_OutOfBounds’ by value [-Wcatch-value=]
  287 |   TS_ASSERT_THROWS(serialize.NumberI32("x", -17, -16, 16), PSERROR_Serialize_OutOfBounds);
      |                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/path/to/trunk/source/simulation2/tests/test_Serializer.h: In member function ‘void TestSerializer::test_script_exceptions()’:
/path/to/trunk/source/simulation2/tests/test_Serializer.h:769:57: warning: catching polymorphic type ‘class PSERROR_Serialize_InvalidScriptValue’ by value [-Wcatch-value=]
  769 |   TS_ASSERT_THROWS(serialize.ScriptVal("script", &obj), PSERROR_Serialize_InvalidScriptValue);

The -Waligned-new= comes from Modio:

../../../source/ps/ModIo.cpp: In member function ‘void ModIo::StartDownloadMod(size_t)’:
../../../source/ps/ModIo.cpp:321:82: warning: ‘new’ of type ‘DownloadCallbackData’ with extended alignment 64 [-Waligned-new=]
  321 |  m_CallbackData = new DownloadCallbackData(sys_OpenFile(m_DownloadFilePath, "wb"));
      |                                                                                  ^
../../../source/ps/ModIo.cpp:321:82: note: uses ‘void* operator new(std::size_t)’, which does not have an alignment parameter
../../../source/ps/ModIo.cpp:321:82: note: use ‘-faligned-new’ to enable C++17 over-aligned new support

The -Wmaybe-uninitialized warning comes from:

In file included from ../../../source/tools/atlas/GameInterface/Handlers/MessageHandler.h:21,
                 from ../../../source/tools/atlas/GameInterface/Handlers/TerrainHandlers.cpp:20:
../../../source/tools/atlas/GameInterface/Handlers/../Messages.h: In function ‘void AtlasMessage::fGetTerrainTexturePreview(AtlasMessage::qGetTerrainTexturePreview*)’:
../../../source/tools/atlas/GameInterface/Handlers/../Messages.h:292:8: warning: ‘*((void*)& noPreview +16)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  292 | struct sTerrainTexturePreview
      |        ^~~~~~~~~~~~~~~~~~~~~~
../../../source/tools/atlas/GameInterface/Handlers/TerrainHandlers.cpp:178:26: note: ‘*((void*)& noPreview +16)’ was declared here
  178 |   sTerrainTexturePreview noPreview;
      |                          ^~~~~~~~~

Not fixed, the -Wstringop-truncation warning is:

In file included from /usr/include/string.h:494,
                 from /usr/include/c++/9.1.0/cstring:42,
                 from /usr/local/include/boost/system/error_code.hpp:20,
                 from /usr/local/include/boost/filesystem/path_traits.hpp:22,
                 from /usr/local/include/boost/filesystem/path.hpp:26,
                 from /usr/local/include/boost/filesystem.hpp:16,
                 from ../../../source/lib/pch/pch_boost.h:57,
                 from ../../../source/lib/precompiled.h:76,
                 from ../../../source/pch/engine/precompiled.h:18,
                 from ../../../source/ps/FileIo.cpp:22:
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘CFilePacker::CFilePacker(u32, const char*)’ at ../../../source/ps/FileIo.cpp:50:9:
/usr/include/bits/string_fortified.h:106:34: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound 4 equals destination size [-Wstringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Not fixed, the -Wclass-memaccess are:

../../../source/lib/res/h_mgr.cpp: In function ‘void h_free_hd(HDATA*)’:
../../../source/lib/res/h_mgr.cpp:578:27: warning: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct HDATA’ with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
  578 |  memset(hd, 0, sizeof(*hd));
      |                           ^
../../../source/lib/res/h_mgr.cpp:140:8: note: ‘struct HDATA’ declared here
  140 | struct HDATA
      |        ^~~~~

In file included from ../../../source/simulation2/helpers/Pathfinding.h:27,
                 from ../../../source/simulation2/helpers/LongPathfinder.h:21,
                 from ../../../source/simulation2/helpers/LongPathfinder.cpp:20:
../../../source/simulation2/helpers/Grid.h: In instantiation of ‘T* SparseGrid<T>::GetBucket(int, int) [with T = PathfindTile]’:
../../../source/simulation2/helpers/Grid.h:238:10:   required from ‘T& SparseGrid<T>::get(int, int) [with T = PathfindTile]’
../../../source/simulation2/helpers/LongPathfinder.cpp:407:41:   required from here
../../../source/simulation2/helpers/Grid.h:194:10: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct PathfindTile’; use assignment or value-initialization instead [-Wclass-memaccess]
  194 |    memset(m_Data[b], 0, BucketSize*BucketSize*sizeof(T));
      |    ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../../source/simulation2/helpers/LongPathfinder.cpp:20:
../../../source/simulation2/helpers/LongPathfinder.h:63:8: note: ‘struct PathfindTile’ declared here
   63 | struct PathfindTile
      |        ^~~~~~~~~~~~

In file included from ../../../source/lib/res/graphics/tests/test_tex.cpp:17:
/path/to/trunk/source/lib/res/graphics/tests/test_tex.h: In member function ‘void TestTex::generate_encode_decode_compare(size_t, size_t, size_t, size_t, const OsPath&)’:
/path/to/trunk/source/lib/res/graphics/tests/test_tex.h:49:27: warning: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct Tex’ with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
   49 |    memset(&t, 0, sizeof(t));
      |                           ^
In file included from /path/to/trunk/source/lib/res/graphics/tests/test_tex.h:25,
                 from ../../../source/lib/res/graphics/tests/test_tex.cpp:17:
../../../source/lib/tex/tex.h:209:8: note: ‘struct Tex’ declared here
  209 | struct Tex
      |        ^~~

Not fixed, the -Warray-bounds is:

In function ‘void* memcpy(void*, const void*, size_t)’,
    inlined from ‘void rewriteBuffer(u8*, u32&)’ at ../../../source/ps/Profiler2.cpp:565:10:
/usr/include/bits/string_fortified.h:34:33: warning: ‘void* __builtin___memcpy_chk(void*, const void*, long unsigned int, long unsigned int)’ forming offset [257, 4294967295] is out of the bounds [0, 256] of object ‘message’ with type ‘char [256]’ [-Warray-bounds]
   34 |   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../source/ps/Profiler2.cpp: In function ‘void rewriteBuffer(u8*, u32&)’:
../../../source/ps/Profiler2.cpp:564:9: note: ‘message’ declared here
  564 |    char message[CProfiler2::MAX_ATTRIBUTE_LENGTH] = {0};
      |         ^~~~~~~

Not fixed, the unused warnings are in UnitMotion from rP22352 and rP22429:

../../../source/simulation2/components/CCmpUnitMotion.cpp: In member function ‘bool CCmpUnitMotion::MoveToPointRange(entity_pos_t, entity_pos_t, entity_pos_t, entity_pos_t, entity_id_t)’:
../../../source/simulation2/components/CCmpUnitMotion.cpp:1342:129: warning: unused parameter ‘target’ [-Wunused-parameter]
 1342 | bool CCmpUnitMotion::MoveToPointRange(entity_pos_t x, entity_pos_t z, entity_pos_t minRange, entity_pos_t maxRange, entity_id_t target)
      |                                                                                                                     ~~~~~~~~~~~~^~~~~~
../../../source/simulation2/components/CCmpUnitMotion.cpp: In member function ‘virtual bool CCmpUnitMotion::MoveToTargetRange(entity_id_t, entity_pos_t, entity_pos_t)’:
../../../source/simulation2/components/CCmpUnitMotion.cpp:1524:17: warning: variable ‘circleDistance’ set but not used [-Wunused-but-set-variable]
 1524 |    entity_pos_t circleDistance = (pos - CFixedVector2D(obstruction.x, obstruction.z)).Length() - circleRadius;
      |                 ^~~~~~~~~~~~~~
../../../source/simulation2/components/CCmpUnitMotion.cpp:1525:17: warning: variable ‘previousCircleDistance’ set but not used [-Wunused-but-set-variable]
 1525 |    entity_pos_t previousCircleDistance = (pos - CFixedVector2D(previousObstruction.x, previousObstruction.z)).Length() - circleRadius;
      |                 ^~~~~~~~~~~~~~~~~~~~~~

Not fixed, the -Wcast-function-type come from mongoose:

../../../source/third_party/mongoose/mongoose.cpp: In function ‘mg_context* mg_start(mg_callback_t, void*, const char**)’:
../../../source/third_party/mongoose/mongoose.cpp:4297:40: warning: cast between incompatible function types from ‘void (*)(mg_context*)’ to ‘mg_thread_func_t’ {aka ‘void* (*)(void*)’} [-Wcast-function-type]
 4297 |   start_thread(ctx, (mg_thread_func_t) master_thread, ctx);
      |                                        ^~~~~~~~~~~~~
../../../source/third_party/mongoose/mongoose.cpp:4301:46: warning: cast between incompatible function types from ‘void (*)(mg_context*)’ to ‘mg_thread_func_t’ {aka ‘void* (*)(void*)’} [-Wcast-function-type]
 4301 |     if (start_thread(ctx, (mg_thread_func_t) worker_thread, ctx) != 0) {
      |                                              ^~~~~~~~~~~~~
Test Plan

Lookup what the compiler warning means, lookup what the affected code does, what it was supposed to do, how it can be fixed to mute the compiler warnings without disabling them.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 8253
Build 13460: Vulcan BuildJenkins
Build 13459: arc lint + arc unit

Event Timeline

elexis created this revision.Jul 8 2019, 4:22 AM
elexis edited the summary of this revision. (Show Details)Jul 8 2019, 4:25 AM
elexis updated this revision to Diff 8774.Jul 8 2019, 4:30 AM

Use initializer list for CSize

Vulcan added a comment.Jul 8 2019, 4:43 AM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/tools/atlas/GameInterface/MessagesSetup.h
|  31| {
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when no macros are defined.

source/tools/atlas/GameInterface/MessagesSetup.h
| 211| }
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when these macros are defined: 'MESSAGESSETUP_NOTFIRST'.

source/tools/atlas/GameInterface/MessagesSetup.h
|  31| {
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when these macros are defined: '_MSC_VER'.

source/tools/atlas/GameInterface/Handlers/TerrainHandlers.cpp
| 211| »   »   »   return;·//·tile·was·out-of-bounds
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when these macros are defined: 'MESSAGESSETUP_NOTFIRST'.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1940/display/redirect

Vulcan added a comment.Jul 8 2019, 5:03 AM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/tools/atlas/GameInterface/MessagesSetup.h
|  31| {
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when no macros are defined.

source/tools/atlas/GameInterface/MessagesSetup.h
| 211| }
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when these macros are defined: 'MESSAGESSETUP_NOTFIRST'.

source/tools/atlas/GameInterface/MessagesSetup.h
|  31| {
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when these macros are defined: '_MSC_VER'.

source/tools/atlas/GameInterface/Handlers/TerrainHandlers.cpp
| 211| »   »   »   return;·//·tile·was·out-of-bounds
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when these macros are defined: 'MESSAGESSETUP_NOTFIRST'.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1941/display/redirect

elexis added inline comments.Jul 8 2019, 8:44 PM
source/graphics/LOSTexture.cpp
367

This change can be tested by compiing, starting a game and looking at the minimap.

source/gui/CGUISprite.h
164

The default ctor should work since it worked before, just now we get a warning if it wasnt explicitly defined.
refs https://en.cppreference.com/w/cpp/language/copy_assignment

179

These elements are copied.

The DrawCallsdefinition reveals empty an copy:

		// Copy/assignment results in an empty list, not an actual copy
source/lib/path.h
91

This change must be correct, because there are only two member variables that are a wstring, and they are correctly copied over and reproduced respectively.

source/tools/atlas/AtlasObject/AtlasObject.h
138

That's the only member and it can be copied as seen above and in AtSmartPtr.

source/tools/atlas/GameInterface/Handlers/TerrainHandlers.cpp
178

above line is the important warning muting one, the one below for consistency

vladislavbelov added inline comments.
source/gui/CGUISprite.h
164

This won't work as the copy constructor. I suppose we should follow the copy constructor here.

source/lib/path.h
88

Indent.

source/ps/Shapes.cpp
28

We should use the same style to initialise members (:).

source/simulation2/tests/test_Serializer.h
286–287

I suppose CxxTest accepts just a type: http://cxxtest.com/guide.html.

source/tools/atlas/GameInterface/Handlers/TerrainHandlers.cpp
178

Why space before {?

source/tools/atlas/GameInterface/MessagesSetup.h
94

The change has a different meaning.

vladislavbelov added inline comments.Jul 9 2019, 12:54 AM
source/lib/path.h
87

It differs from the copy assignment.

elexis added inline comments.Jul 9 2019, 1:05 AM
source/gui/CGUISprite.h
164

Agree (see also IRC comments)

https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B)

The copy assignment operator differs from the copy constructor in that it must clean up the data members of the assignment's target

source/lib/path.h
87

Copies the path wstring and updates the path separator?

source/ps/Shapes.cpp
28

coding conventions say keep consistent within the file first, then with the parent folder etc.

source/simulation2/tests/test_Serializer.h
286–287

It says warning: catching polymorphic type ‘class PSERROR_Serialize_OutOfBounds’ by value [-Wcatch-value=]

https://en.cppreference.com/w/cpp/language/try_catch

} catch (const std::exception& e) { // reference to the base of a polymorphic object

https://stackoverflow.com/questions/2522299/c-catch-blocks-catch-exception-by-value-or-reference
https://www.nsnam.org/bugzilla/show_bug.cgi?id=2917

so passing by reference seems right, no?

source/tools/atlas/GameInterface/MessagesSetup.h
94

Warning is

warning: implicitly-declared ‘AtlasMessage::dSetMapSettings::dSetMapSettings(const AtlasMessage::dSetMapSettings&)’ is deprecated [-Wdeprecated-copy]

elexis updated this revision to Diff 8785.Jul 9 2019, 1:08 AM

whitespace, Sprite rework

elexis updated this revision to Diff 8786.Jul 9 2019, 1:12 AM

Don't use the string() getter for path.h but the member variable directly so it's consistent for the assignment operator.

vladislavbelov added inline comments.Jul 9 2019, 1:26 AM
source/gui/CGUISprite.cpp
76

Why no Invalidate();?

source/simulation2/tests/test_Serializer.h
286–287

Logically you're right, I'm just worrying about what CxxTest plans to do with that param. It can change its usage. But I think we'll catch it.

source/tools/atlas/GameInterface/Handlers/TerrainHandlers.cpp
179

Btw, it seems redundant since we don't initialise the std::vector, but it doesn't matter at the moment.

Vulcan added a comment.Jul 9 2019, 1:27 AM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/gui/CGUISprite.h
|   1| /*·Copyright·(C)·2015·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2015"

source/tools/atlas/GameInterface/MessagesSetup.h
|  31| {
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when no macros are defined.

source/tools/atlas/GameInterface/MessagesSetup.h
| 211| }
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when these macros are defined: 'MESSAGESSETUP_NOTFIRST'.

source/tools/atlas/GameInterface/MessagesSetup.h
|  31| {
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when these macros are defined: '_MSC_VER'.

source/tools/atlas/GameInterface/Handlers/TerrainHandlers.cpp
| 211| »   »   »   return;·//·tile·was·out-of-bounds
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when these macros are defined: 'MESSAGESSETUP_NOTFIRST'.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1949/display/redirect

elexis added inline comments.Jul 9 2019, 1:30 AM
source/gui/CGUISprite.cpp
76

The contents of this function would be the same as the assignment operator below, so I removed the duplication this way.

source/tools/atlas/GameInterface/Handlers/TerrainHandlers.cpp
179

yes, I thought it might be a little bit more explicit, for the reader to be aware that these members must be taken care of.
can also implement a ctor I guess if we want more explicitness.

vladislavbelov accepted this revision.Jul 9 2019, 1:33 AM
vladislavbelov added inline comments.
source/gui/CGUISprite.cpp
76

For a more explicit call you could use explicit operator call: return this->operator=(Sprite.m_SpriteName);.

This revision is now accepted and ready to land.Jul 9 2019, 1:33 AM
vladislavbelov added inline comments.Jul 9 2019, 1:44 AM
source/tools/atlas/GameInterface/MessagesSetup.h
94

Btw, it should be = deleted as I understand.

Vulcan added a comment.Jul 9 2019, 1:45 AM

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...

source/tools/atlas/GameInterface/MessagesSetup.h
|  31| {
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when no macros are defined.

source/tools/atlas/GameInterface/MessagesSetup.h
| 211| }
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when these macros are defined: 'MESSAGESSETUP_NOTFIRST'.

source/tools/atlas/GameInterface/MessagesSetup.h
|  31| {
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when these macros are defined: '_MSC_VER'.

source/gui/CGUISprite.h
|   1| /*·Copyright·(C)·2015·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2015"

source/tools/atlas/GameInterface/Handlers/TerrainHandlers.cpp
| 211| »   »   »   return;·//·tile·was·out-of-bounds
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when these macros are defined: 'MESSAGESSETUP_NOTFIRST'.
Executing section JS...
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1950/display/redirect

elexis added inline comments.Jul 9 2019, 2:16 AM
source/tools/atlas/GameInterface/MessagesSetup.h
94

Agree, the ctor is private, so that it can't be called, hence it's a safeguard and delete is better to reflect that.

and it should be supported as it uses C++11
http://www.stroustrup.com/C++11FAQ.html#default

This revision was automatically updated to reflect the committed changes.
Owners added subscribers: Restricted Owners Package, Restricted Owners Package, Restricted Owners Package.Jul 9 2019, 2:19 AM