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

unused variable in e_path.cc #121

Open
sneakernets opened this issue Jan 25, 2022 · 2 comments
Open

unused variable in e_path.cc #121

sneakernets opened this issue Jan 25, 2022 · 2 comments
Labels
Projects

Comments

@sneakernets
Copy link

[2/118] Building CXX object src/CMakeFiles/eurekasrc.dir/e_path.cc.o
FAILED: src/CMakeFiles/eurekasrc.dir/e_path.cc.o
/usr/bin/c++  -DBUILT_VIA_CMAKE -D_CRT_SECURE_NO_WARNINGS -I../ -I/usr/lib/fltk -I../src -Isrc -O3 -DNDEBUG   -Wall -Wextra -Werror -Wno-unused-parameter -Wno-missing-field-initializers -std=gnu++17 -MD -MT src/CMakeFiles/eurekasrc.dir/e_path.cc.o -MF src/CMakeFiles/eurekasrc.dir/e_path.cc.o.d -o src/CMakeFiles/eurekasrc.dir/e_path.cc.o -c ../src/e_path.cc
../src/e_path.cc: In member function ‘void Instance::CMD_JumpToObject()’:
../src/e_path.cc:457:13: error: unused variable ‘num’ [-Werror=unused-variable]
     for(int num : nums)
             ^~~
cc1plus: all warnings being treated as errors
@ioan-chera
Copy link
Owner

It was a single assert macro becoming nothing in case of release building. Hopefully fixed, but apparently I can't catch it when developing locally. I'm going to check the GitHub actions and see if I can catch it there.

@ioan-chera ioan-chera added the bug label Jan 31, 2022
@ioan-chera ioan-chera added this to To do in Eureka v2.0 via automation Jan 31, 2022
@ioan-chera
Copy link
Owner

More problems going on:

/home/pi/Code/eureka-editor/src/w_wad.cc: In member function ‘int64_t Lump_c::getName8() const’:
/home/pi/Code/eureka-editor/src/w_wad.cc:179:9: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound 8 equals destination size [-Werror=stringop-truncation]
  strncpy(buffer.cbuf, Name().c_str(), 8);
  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In member function ‘int64_t Lump_c::getName8() const’,
    inlined from ‘void Wad_file::writeToPath(const SString&) const’ at /home/pi/Code/eureka-editor/src/w_wad.cc:968:29:
/home/pi/Code/eureka-editor/src/w_wad.cc:179:9: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound 8 equals destination size [-Werror=stringop-truncation]
  strncpy(buffer.cbuf, Name().c_str(), 8);
  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

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

No branches or pull requests

2 participants