HP Code Advisor Diagnostics

The same base class name is specified more than once in the base class list. A base class name
should appear only once in a base class list.
Example:
class Base {};
class Derived: public Base, protected Base {};
Action:
Remove the redundant base class name, for example: class Derived: public Base {};
Reference:
2265 %nd is inaccessible
Cause:
An attempt is made to access a private or protected member in the context where the member
is not accessible.
Example:
class A {
private:
int x;
} c;
c.x = 0;
Action:
Fix the access specifier of the member or the statement that is accessing the member.
Reference:
2267 old-style parameter list (anachronism)
Cause:
The given function is defined using the old style K&R syntax. The C standard has marked this
syntax as obsolescent, and it is not supported in C++. Consider using the standard C prototype
syntax.
Example:
int foo(arg)
int arg;
{ return arg; }
Action:
Recode the function definition to use the recommended prototype-format definition.
Reference:
C99 6.9.1
2269 conversion to inaccessible base class %t is not allowed
Cause:
It is incorrect to assign a derived object to a protected or private base class pointer or reference
without an explicit cast. NOTE: If an explicit access specifier is missing while inheriting from a
base class then private inheritance is assumed. In case of inheriting from a struct public inheritance
is assumed.
Example:
class Base {};
class Derived: protected Base{};
Base *b = new Derived;
Action:
2265 %nd is inaccessible 41