|
![]() Click on image to see enlargment |
|
PC-lint/FlexeLint Output | Reference Manual Explanation | Home bug464.cpp
The football coach wanted to prefix a position indicator before each player so that in this example he would get "QB Joe Jackson". But something went wrong. Can you spot the problem? bug464.cpp lint Output
--- Module: bug464.cpp (C++)
_
sprintf( name, "%s %s", pos, name );
bug464.cpp(8) : Warning 464: Buffer argument will be copied into itself
Reference Manual Explanation
464 Buffer argument will be copied into itself -- This is issued
when we encounter a function argument expression used in such a
way that there will be an attempt to copy its contents onto
itself. E.g.
sprintf( s, "%s", s );
If you have comments or questions about this bug, please post them to our Discussion Forum |
Previous Bug - Bug #440 - October 2008