Commit graph

11 commits

Author SHA1 Message Date
Ralph Sennhauser
58219b974c
Fix trailing whitespace and add pre-commit hook
Some have their editor configured to remove trailing whitespace and
editing such a file would "fix" it, adding an unrelated change.

Fix whitespace violations excluding third party libs and generated files
like glad or patches.

Enable pre-commit hook trailing-whitespace to enforce it in the future.

Fixes: #8016
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-06-15 20:08:48 +02:00
Ralph Sennhauser
a09b2cc242
Disable deprecation warning for old boost
There are a few version of boost which deprecated global placeholders
but do not yet support std placeholders. Simply suppress warning for
those cases.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-03-23 14:38:43 +01:00
Ralph Sennhauser
9a43c43a33
Avoid gcc warning in json_spirit
Gcc-14 triggers a warning for substitute_esc_chars in
json_spirit_reader_template.h if optimizations are enabled.

../../../source/third_party/jsonspirit/json_spirit_reader_template.h:138:62:
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/char_traits.h:427:56: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775808 or more bytes at offsets 0 and 0 may overlap up to 9223372036854775809 bytes at offset -1 [-Wrestrict]
  427 |         return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));

for with lto enabled

/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/char_traits.h:427:56: warning: ‘__builtin_memcpy’ specified bound between 9223372036854775808 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
  427 |         return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));

This looks like another incarnation of bugs like:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100366

Add quirk to avoid the warning

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-02-19 21:52:50 +01:00
Ralph Sennhauser
a9241f4cc7
Use std::placeholders for json_spirit
"bind.hpp" was moved in boost-1.39. [1]

Placeholders were moved in boost 1.60. [2]

Since boost 1.73 placeholders defined in global namespace are
deprectared. [3]

Boost 1.76 added support for using std::placeholders with
boost::bind. [4]

This change uses the new, cough, location of the header and
std::placerholders for boost 1.76 plus to silence the deprecation
warning there.

Following commits are from https://github.com/boostorg/bind.git
[1] 8f507b9aeca643ca78e6a712b6d300720627c0ed
[2] db56733e4ed2125944b89e01cf36a9e451dd36f5
[3] 2797f0dc33caaae126a416bf613bd11267ba3353
[4] c85b31e3d200dda2a73cf0027a82c6d8e29066f8

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-10-24 19:53:23 +02:00
Itms
1c12ada278 Remove unused typedef in json_spirit
This fixes -Wunused-local-typedef with macOS's clang10.
2024-09-28 21:55:30 +02:00
Stan
4942cabab5 Fix most Clang 10 Warnings
Refs: #5550, #5294

Remove dead code from f71be3c764
Fix buggy code from ff50b0b74c
Comments by: @wraitii, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3177
This was SVN commit r24487.
2020-12-31 14:25:37 +00:00
Stan
e3c5cc83b7 Fix oversight in 0d28281485
This was SVN commit r24482.
2020-12-31 11:07:10 +00:00
Stan
0d28281485 Update JSON_SPIRIT from 4.06 to 4.08
This was SVN commit r24481.
2020-12-31 10:25:34 +00:00
Stan
9ae084519f Fix most of the new vs2017 induced warnings.
Refs: https://code.wildfiregames.com/D3096
https://code.wildfiregames.com/D3103 #5862
Reviewed by: @wraitii
Comments by: @Angen
Differential Revision: https://code.wildfiregames.com/D3126
This was SVN commit r24268.
2020-11-26 22:28:50 +00:00
elexis
c136848b74 Fix lineendings of new files and the ones in source/ that didn't receive the eol property yet.
To confirm, use svn diff -r 20355:20356 -x "-w --ignore-eol-style"
--ignore-properties  | less

This was SVN commit r20356.
2017-10-26 17:03:29 +00:00
Yves
17f8f09399 Removes the ScriptInterface and SpiderMonkey dependencies from Atlas.
Replaces the code for JSON parsing and writing with an implementation
using the JSON Spirit library.

Fixes #2434
Refs #1886

This was SVN commit r14783.
2014-02-24 20:22:02 +00:00