drmortalwombat / oscar64

Optimizing Small memory C Compiler Assembler and Runtime for C64
GNU General Public License v3.0
273 stars 24 forks source link

Minor warning #36

Closed polluks closed 9 months ago

polluks commented 10 months ago

c++ -c -g -O2 -std=c++11 -Wno-switch ../oscar64/Declaration.cpp -o Declaration.o
../oscar64/Declaration.cpp:1219:7: warning: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]
        if (!this)
            ~^~~~
../oscar64/Declaration.cpp:1243:7: warning: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]
        if (!this)
            ~^~~~
2 warnings generated.
soegaard commented 9 months ago

FWIW I got the same warnings on macOS Ventura 13.3.1.

c++ --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: x86_64-apple-darwin22.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

No other warnings or errors from running make.

drmortalwombat commented 9 months ago

Fixed, please recheck

polluks commented 9 months ago

thx