Summary: This patch contains fixes for the causes of
various warnings that were flagged by aggressive use of
the g++ warning options. At least some of these
warnings pointed out cases in the code that would have
caused crashes or undesired behavior.
Also includes additional conversions from using
integer error codes
to using the Ťenum errorsť error codes. Revised the
system to use the predicates isSuccess() and
Unpatcking instructions included in the patch.
Long Description (this is identical to the contents of
the .msg-2 files):
MIME.cpp: Converted more code to use enum errors.
Commented out unused code.
Revised decode64() to be more robust: (a) added
(b) added comments
(c) moved variables from function-scope into the
MIME.h: Match changes in MIME.cpp
callbacks.cpp: Added error checking to the call to
Improved error messages by calls to the new
errors.cpp: Renamed Fail() and Success() to isFailure()
isSuccess(), so that it's clearer to the reader that
errors.h: Match changes made to internal_error.cpp and
internal_error.cpp: Renamed internal_error(const char
, ...) to
internal_error_sprintf(). This fixes a link-time
that function and internal_error(const char); the
too close for the compiler to distinguish.
Also fixed bug in use of va_end() in
would not have shown up except on certain odd
platforms; va_end() is
usually a no-op.
tcpUtilities.cpp: Added assertions and calls to
confirm that Althea doesn't try to use SSL without
compiled in. Like the standard assert() macro, these
by compiling code with -DNDEBUG.
Modified ReadFromSocket() to clear up a
SelectFolder.cpp: More use of enum errors instead of
int error codes.
Use assertions to catch any cases of what the
compiler warned of as
a possibly-used-before-set bug,
SelectFolder.h: Change function prototypes to reflect
changes to SelectFolder.cpp.
Server.cpp: Used #if 0 to comment out incomplete code
that is never
used. (The incomplete code justifiably triggers
load_config.cpp: Used #if 0 to comment out unused
load_config.h: #if 0 to comment out unused function
Makefile: Added a useful development target to the
.cpp.i. This lets us generate .i files containing
preprocessed versions of the source.
support.cpp: New function, error_sprintf(). Formats an
and then displays it by calling the existing error()
support.h: Added prototype to match addition of
error_sprintf() to support.cpp.