Typical warning function
This function is useful to display and record the warning count. You may later use the count as failure exit code.

Example:

Copyright (C) 2006 Andrey Mirzoyan