duthng / owasp-esapi-cplusplus

Automatically exported from code.google.com/p/owasp-esapi-cplusplus
0 stars 0 forks source link

Virtual Function Hiding #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The Intel compiler has flagged a few functions for warning 1125, "entity-kind 
'entity' is hidden by 'entity' -- virtual function override intended?". Please 
verify the intentions. See http://software.intel.com/en-us/articles/cdiag1125/.

My apologies - I don't know what's supposed to happen and what is needed for 
behavior and functionality.

Jeff

icpc -DNDEBUG=1 -g3 -ggdb -O2 -DSAFEINT_DISALLOW_UNSIGNED_NEGATION=1 -pipe 
-std=c++0x -Wall -wd1011 -D_REENTRANT -I. -I./esapi -I./deps 
-I/usr/local/include -fpic -c src/reference/DefaultValidator.cpp -o 
src/reference/DefaultValidator.o
./esapi/reference/validation/BaseValidationRule.h(69): warning #1125: function 
"esapi::ValidationRule::setEncoder(esapi::Encoder &)" is hidden by 
"esapi::BaseValidationRule::setEncoder" -- virtual function override intended?
        virtual void setEncoder(const Encoder &) =0;
                     ^

./esapi/reference/validation/BaseValidationRule.h(94): warning #1125: function 
"esapi::ValidationRule::whitelist(const std::string &, std::set<char, 
std::less<char>, std::allocator<char>>)" is hidden by 
"esapi::BaseValidationRule::whitelist" -- virtual function override intended?
        virtual std::string whitelist(const std::string &, const std::set<char> &);
                            ^

icpc -DNDEBUG=1 -g3 -ggdb -O2 -DSAFEINT_DISALLOW_UNSIGNED_NEGATION=1 -pipe 
-std=c++0x -Wall -wd1011 -D_REENTRANT -I. -I./esapi -I./deps 
-I/usr/local/include -fpic -c src/reference/validation/BaseValidationRule.cpp 
-o src/reference/validation/BaseValidationRule.o
./esapi/reference/validation/BaseValidationRule.h(69): warning #1125: function 
"esapi::ValidationRule::setEncoder(esapi::Encoder &)" is hidden by 
"esapi::BaseValidationRule::setEncoder" -- virtual function override intended?
        virtual void setEncoder(const Encoder &) =0;
                     ^

./esapi/reference/validation/BaseValidationRule.h(94): warning #1125: function 
"esapi::ValidationRule::whitelist(const std::string &, std::set<char, 
std::less<char>, std::allocator<char>>)" is hidden by 
"esapi::BaseValidationRule::whitelist" -- virtual function override intended?
        virtual std::string whitelist(const std::string &, const std::set<char> &);
                            ^

Original issue reported on code.google.com by noloa...@gmail.com on 9 Aug 2011 at 11:02

GoogleCodeExporter commented 8 years ago
Note: GCC does not issue a warning for this issue: 
http://gcc.gnu.org/ml/gcc-help/2011-08/msg00108.html. Neither does MSVC.

Original comment by noloa...@gmail.com on 9 Aug 2011 at 1:04

GoogleCodeExporter commented 8 years ago
My bad - GCC has -Woverloaded-virtual warning. Added to the project's Makefile.

Original comment by noloa...@gmail.com on 9 Aug 2011 at 1:56

GoogleCodeExporter commented 8 years ago
Cleared warnings at R152 
(http://code.google.com/p/owasp-esapi-cplusplus/source/detail?r=152)

Original comment by noloa...@gmail.com on 11 Aug 2011 at 2:34