]> granicus.if.org Git - mutt/commit
Fix compiler type warnings. (closes #3765)
authorKevin McCarthy <kevin@8t8.us>
Thu, 23 Jul 2015 21:57:04 +0000 (14:57 -0700)
committerKevin McCarthy <kevin@8t8.us>
Thu, 23 Jul 2015 21:57:04 +0000 (14:57 -0700)
commitd1ee38fec1c72878816bb8cc20d63a4dea6a4ca3
tree048e602e21589771d70daa281791fea46be8b5e1
parent280e870149dc27eb00eef9ae2004579966cd051f
Fix compiler type warnings. (closes #3765)

The output of mutt_local_tz() was being passed to abs().  Technically
the return type is time_t, but it represents a small value: the timezone
offset in seconds.  Add a safe explicit cast to int.

Change the txt parameter of mutt_make_help() to type const char *.
Typically all calls run the txt parameter through _(), which
accepts const char * and returns a char *. However, if NLS is not
enabled, _() is a noop, simply returning the parameter itself.  In
mutt_compile_help(), items[i].name is const char *, so it will generate
a warning when passed as the txt parameter of mutt_make_help().

On some systems, e.g. OS X, snprintf is defined as a macro.  One call
in hcache.c was embedding directives inside the snprintf call.  This is
apparently undefined behavior, so duplicate the call instead.
hcache.c
help.c
imap/util.c
protos.h
sendlib.c