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

Compiler warnings in ubuntu #466

Open
nshaheed opened this issue Oct 18, 2024 · 0 comments
Open

Compiler warnings in ubuntu #466

nshaheed opened this issue Oct 18, 2024 · 0 comments
Assignees

Comments

@nshaheed
Copy link
Contributor

When compiling chuck on WSL (ubuntu with g++ 11.4.0) I get the compiler warnings:

In member function ‘const char* Chuck_Type::c_name()’,
    inlined from ‘long unsigned int Chuck_Op_Registry::add_overload(Chuck_Type*, ae_Operator, Chuck_Type*, Chuck_Func*, ckte_Origin, const string&, long int, long unsigned int)’ at chuck_type.cpp:10780:22,
    inlined from ‘long unsigned int Chuck_Op_Registry::add_overload(Chuck_Type*, ae_Operator, Chuck_Func*, ckte_Origin, const string&, long int, long unsigned int)’ at chuck_type.cpp:10829:30:
chuck_type.cpp:9717:16: warning: ‘this’ pointer is null [-Wnonnull]
 9717 |     return name().c_str();
      |            ~~~~^~
chuck_type.cpp: In member function ‘long unsigned int Chuck_Op_Registry::add_overload(Chuck_Type*, ae_Operator, Chuck_Func*, ckte_Origin, const string&, long int, long unsigned int)’:
chuck_type.cpp:9697:21: note: in a call to non-static member function ‘const string& Chuck_Type::name()’
 9697 | const std::string & Chuck_Type::name()
      |                     ^~~~~~~~~~
In member function ‘const char* Chuck_Type::c_name()’,
    inlined from ‘long unsigned int Chuck_Op_Registry::add_overload(Chuck_Type*, ae_Operator, Chuck_Type*, Chuck_Func*, ckte_Origin, const string&, long int, long unsigned int)’ at chuck_type.cpp:10782:22,
    inlined from ‘long unsigned int Chuck_Op_Registry::add_overload(Chuck_Type*, ae_Operator, Chuck_Func*, ckte_Origin, const string&, long int, long unsigned int)’ at chuck_type.cpp:10829:30:
chuck_type.cpp:9717:16: warning: ‘this’ pointer is null [-Wnonnull]
 9717 |     return name().c_str();
      |            ~~~~^~
chuck_type.cpp: In member function ‘long unsigned int Chuck_Op_Registry::add_overload(Chuck_Type*, ae_Operator, Chuck_Func*, ckte_Origin, const string&, long int, long unsigned int)’:
chuck_type.cpp:9697:21: note: in a call to non-static member function ‘const string& Chuck_Type::name()’
 9697 | const std::string & Chuck_Type::name()
      |                     ^~~~~~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants