--- Module: ex.cpp
_
#define Extract(ch) (ch) & 0xFf
ex.cpp (5) : Info 773: Expression-like macro 'Extract' not parenthesized
_
f = fopen( fn, "r" );
ex.cpp (16) : Warning 668: Possibly passing a null pointer to function
'fopen(const char *, const char *)', arg. no. 1 [Reference: file ex.cpp:
line 15]
_
(void) fgets( buf, 101, f );
ex.cpp (17) : Warning 668: Possibly passing a null pointer to function
'fgets(char *, int, FILE *)', arg. no. 3 [Reference: file ex.cpp: line 16]
ex.cpp (17) : Warning 419: Apparent data overrun for function 'fgets(char *,
int, FILE *)', argument 2 (size=101) exceeds argument 1 (size=100)
[Reference: file ex.cpp: line 17]
_
fclose( f );
ex.cpp (18) : Warning 668: Possibly passing a null pointer to function
'fclose(FILE *)', arg. no. 1 [Reference: file ex.cpp: line 16]
_
}
ex.cpp (19) : Info 818: Pointer parameter 'fn' (line 10) could be declared as
pointing to const
_
sum = sum + Value(Extract(*s++));
ex.cpp (25) : Warning 666: Expression with side effects passed to repeated
parameter 1 in macro 'Value'
_
return Abs( sum - 100 );
ex.cpp (26) : Warning 665: Unparenthesized parameter 1 in macro 'Abs' is passed
an expression
_
}
ex.cpp (27) : Info 818: Pointer parameter 's' (line 21) could be declared as
pointing to const
_
}
ex.cpp (43) : Info 818: Pointer parameter 's' (line 35) could be declared as
pointing to const
ex.cpp (43) : Warning 1541: Member 'String::a' (line 32) possibly not
initialized by constructor
ex.cpp (43) : Warning 1541: Member 'String::len' (line 33) possibly not
initialized by constructor
_
~String() { len = 0; }
ex.cpp (44) : Warning 1540: Pointer member 'String::a' (line 32) neither freed
nor zero'ed by destructor
_
a = new char[len];
ex.cpp (49) : Warning 423: Creation of memory leak in assignment to 'String::a'
_
return s;
ex.cpp (51) : Info 1772: Assignment operator 'String::operator=(const String
&)' is not returning *this
ex.cpp (51) : Warning 1561: Reference initialization causes loss of
const/volatile integrity (return)
_
}
ex.cpp (52) : Warning 1529: Symbol 'String::operator=(const String &)' not
first checking for assignment to this
--- Wrap-up for Module: ex.cpp
Info 753: local class 'String' (line 29, file ex.cpp) not referenced
Info 754: local structure member 'String::String(const String &)' (line 45,
file ex.cpp) not referenced
Info 766: Header file 'c:\ansi\stdlib.h' not used in module 'ex.cpp'
|