summaryrefslogtreecommitdiffstats
path: root/help.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2015-07-23 14:57:04 -0700
committerKevin McCarthy <kevin@8t8.us>2015-07-23 14:57:04 -0700
commitd1ee38fec1c72878816bb8cc20d63a4dea6a4ca3 (patch)
tree048e602e21589771d70daa281791fea46be8b5e1 /help.c
parent280e870149dc27eb00eef9ae2004579966cd051f (diff)
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.
Diffstat (limited to 'help.c')
-rw-r--r--help.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/help.c b/help.c
index 8afabf03..c8042743 100644
--- a/help.c
+++ b/help.c
@@ -54,7 +54,7 @@ static const struct binding_t *help_lookupFunction (int op, int menu)
return (NULL);
}
-void mutt_make_help (char *d, size_t dlen, char *txt, int menu, int op)
+void mutt_make_help (char *d, size_t dlen, const char *txt, int menu, int op)
{
char buf[SHORT_STRING];