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

some warnings to fix #3

Open
illwieckz opened this issue Oct 25, 2018 · 0 comments
Open

some warnings to fix #3

illwieckz opened this issue Oct 25, 2018 · 0 comments

Comments

@illwieckz
Copy link
Member

illwieckz commented Oct 25, 2018

some warnings to fix:

In file included from /home/illwieckz/dev/netradiant/tools/quake3/q3map2/nav.cpp:28:0:
/home/illwieckz/dev/netradiant/tools/quake3/q3map2/navgen.h:101:1: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 const int              getNumVerts() { return nverts; }
 ^~~~~
/home/illwieckz/dev/netradiant/tools/quake3/q3map2/nav.cpp: In function ‘void LoadBrushTris(std::vector<float>&, std::vector<int>&)’:
/home/illwieckz/dev/netradiant/tools/quake3/q3map2/nav.cpp:178:55: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  ApplySurfaceParm( "default", &solidFlags, NULL, NULL );
                                                       ^
/home/illwieckz/dev/netradiant/tools/quake3/q3map2/nav.cpp:179:52: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  ApplySurfaceParm( "playerclip", &temp, NULL, NULL );
                                                    ^
/home/illwieckz/dev/netradiant/tools/quake3/q3map2/nav.cpp:183:53: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
   ApplySurfaceParm( "sky", NULL, &surfaceSkip, NULL );
                                                     ^
/home/illwieckz/dev/netradiant/tools/quake3/q3map2/nav.cpp: In function ‘void LoadPatchTris(std::vector<float>&, std::vector<int>&)’:
/home/illwieckz/dev/netradiant/tools/quake3/q3map2/nav.cpp:551:55: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  ApplySurfaceParm( "default", &solidFlags, NULL, NULL );
                                                       ^
/home/illwieckz/dev/netradiant/tools/quake3/q3map2/nav.cpp:552:52: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  ApplySurfaceParm( "playerclip", &temp, NULL, NULL );
                                                    ^
/home/illwieckz/dev/netradiant/tools/quake3/q3map2/nav.cpp: In function ‘void rcFilterGaps(rcContext*, int, int, int, rcHeightfield&)’:
/home/illwieckz/dev/netradiant/tools/quake3/q3map2/nav.cpp:980:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for ( int i = 0; i < spanData.size(); i += 3 ) {
                   ~~^~~~~~~~~~~~~~~~~
@illwieckz illwieckz changed the title some warnings to fix in daemonmap branch: some warnings to fix Oct 27, 2018
illwieckz added a commit that referenced this issue Mar 7, 2021
This isssue:

```
netradiant/plugins/vfspk3/vfs.cpp:595:7: warning: array index 1024 is past the end of the array (which contains 1024 elements)
      [-Warray-bounds]
                                                tmppath[PATH_MAX] = '\0';
                                                ^       ~~~~~~~~
netradiant/plugins/vfspk3/vfs.cpp:587:5: note: array 'tmppath' declared here
                                char tmppath[PATH_MAX];
                                ^
netradiant/plugins/vfspk3/vfs.cpp:607:7: warning: array index 1024 is past the end of the array (which contains 1024 elements)
      [-Warray-bounds]
                                                tmppath[PATH_MAX] = '\0';
                                                ^       ~~~~~~~~
netradiant/plugins/vfspk3/vfs.cpp:587:5: note: array 'tmppath' declared here
                                char tmppath[PATH_MAX];
```

is producing this (on macOS):

```
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00007fff58f4f2c6 libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
->  0x7fff58f4f2c6 <+10>: jae    0x7fff58f4f2d0            ; <+20>
    0x7fff58f4f2c8 <+12>: movq   %rax, %rdi
    0x7fff58f4f2cb <+15>: jmp    0x7fff58f49457            ; cerror_nocancel
    0x7fff58f4f2d0 <+20>: retq
Target 0: (netradiant) stopped.
(lldb) thread backtrace all
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
  * frame #0: 0x00007fff58f4f2c6 libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff5900abf1 libsystem_pthread.dylib`pthread_kill + 284
    frame #2: 0x00007fff58eb9745 libsystem_c.dylib`__abort + 144
    frame #3: 0x00007fff58eb9ff3 libsystem_c.dylib`__stack_chk_fail + 205
    frame #4: 0x000000010a8a7e59 libvfspk3.so`InitDirectory(char const*, Modules<_QERArchiveTable>&) + 7689
    frame #5: 0x00000001000e0a57 netradiant`QE_InitVFS() + 1351
    frame #6: 0x0000000100094673 netradiant`VFSModuleObserver::realise() + 19
    frame #7: 0x000000010009478a netradiant`HomePathsModuleObserver::realise() + 58
    frame #8: 0x000000010008906a netradiant`EnginePath_Realise() + 58
    frame #9: 0x00000001000d3f5f netradiant`Radiant::Radiant() + 351
    frame #10: 0x00000001000d15d1 netradiant`Radiant_Construct(ModuleServer&) + 353
    frame #11: 0x000000010008a84a netradiant`Radiant_Initialise() + 42
    frame #12: 0x0000000100088087 netradiant`main + 535
    frame #13: 0x00007fff58e143d5 libdyld.dylib`start + 1
  thread #2
    frame #0: 0x00007fff58f4abfe libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff59007636 libsystem_pthread.dylib`_pthread_wqthread + 458
    frame #2: 0x00007fff590073fd libsystem_pthread.dylib`start_wqthread + 13
  thread #3
    frame #0: 0x00007fff58f4abfe libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #1: 0x00007fff59007636 libsystem_pthread.dylib`_pthread_wqthread + 458
    frame #2: 0x00007fff590073fd libsystem_pthread.dylib`start_wqthread + 13
  thread #4
    frame #0: 0x00007fff58f4abfe libsystem_kernel.dylib`__workq_kernreturn + 10
    frame #&1: 0x00007fff590076e6 libsystem_pthread.dylib`_pthread_wqthread + 634
    frame #2: 0x00007fff590073fd libsystem_pthread.dylib`start_wqthread + 13
```
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