Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC warnings for multichar int constants #2277

Open
nic11 opened this issue Dec 22, 2024 · 0 comments
Open

GCC warnings for multichar int constants #2277

nic11 opened this issue Dec 22, 2024 · 0 comments

Comments

@nic11
Copy link
Collaborator

nic11 commented Dec 22, 2024

To reproduce, build with GCC on Arch (after #2276 is merged):

g++ --version
g++ (GCC) 14.2.1 20240910
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
/home/roma/my/skymp/skymp-arch/skymp5-server/cpp/addon/ScampServer.cpp:1141:19: warning: multi-character character constant [-Wmultichar]
 1141 |   if (callType == 'meth') {
      |                   ^~~~~~
/home/roma/my/skymp/skymp-arch/skymp5-server/cpp/addon/ScampServer.cpp:1150:26: warning: multi-character character constant [-Wmultichar]
 1150 |   } else if (callType == 'glob') {
      |                          ^~~~~~
/home/roma/my/skymp/skymp-arch/skymp5-server/cpp/addon/ScampServer.cpp:1191:21: warning: multi-character character constant [-Wmultichar]
 1191 |       callTypeInt = 'meth';
      |                     ^~~~~~
/home/roma/my/skymp/skymp-arch/skymp5-server/cpp/addon/ScampServer.cpp:1193:21: warning: multi-character character constant [-Wmultichar]
 1193 |       callTypeInt = 'glob';
      |                     ^~~~~~
/home/roma/my/skymp/skymp-arch/skymp5-server/cpp/addon/ScampServer.cpp:1465:47: warning: multi-character character constant [-Wmultichar]
 1465 |         int callType = jsThis.IsUndefined() ? 'glob' : 'meth';
      |                                               ^~~~~~
/home/roma/my/skymp/skymp-arch/skymp5-server/cpp/addon/ScampServer.cpp:1465:56: warning: multi-character character constant [-Wmultichar]
 1465 |         int callType = jsThis.IsUndefined() ? 'glob' : 'meth';
      |                                                        ^~~~~~

39c8261#diff-c35c3fcadfee3ad4d1ada7e1172ffc7eac60c0e3c60c369ab71a886a025d37ceR1104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant