|
PC-lint/FlexeLint Output | Reference Manual Explanation | Home Page bug603.cpp
Our programmer in this example is employing a string copying routine from a library (the declaration has been copied from the header file and shown explicitly) but he was surprised to find that things didn't quite work out. Why? bug603.cpp lint Output --- Module: bug603.cpp
_
string_copy( buf, "hello world" );
bug603.cpp(9) : Info 1776: Converting a string literal to char * is not const
safe (arg. no. 2)
bug603.cpp(9) : Warning 603: Symbol 'buf' (line 7) not initialized
Reference Manual Explanation
603 Symbol 'Symbol' (Location) not initialized -- The address
of the named symbol is being passed to a function where
the corresponding parameter is declared as pointer to
const. This implies that the function will not modify the
object. If this is the case then the original object
should have been initialized sometime earlier.
|
Previous Bug - Bug