From 45528548fd2dddcbef9396b0589ec88d722766ee Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 17 Nov 2006 18:17:12 +0100 Subject: [PATCH] Fix multiple compilation warnings - Include lib-*/*.h where missing - Put some static and const stuff - Change _mutt_mktemp to mutt_mktemp Signed-off-by: Julien Danjou Signed-off-by: Pierre Habouzit --- account.c | 1 + copy.c | 1 + editmsg.c | 1 + handler.c | 2 ++ init.c | 2 +- mutt_sasl.h | 4 ++-- muttlib.c | 4 +++- postpone.c | 3 +++ protos.h | 3 +-- recvattach.c | 2 ++ sort.c | 2 ++ 11 files changed, 19 insertions(+), 6 deletions(-) diff --git a/account.c b/account.c index 73a036a..c9ac175 100644 --- a/account.c +++ b/account.c @@ -11,6 +11,7 @@ #include #include +#include #include "mutt.h" #include "account.h" diff --git a/copy.c b/copy.c index 65ed14c..6df4003 100644 --- a/copy.c +++ b/copy.c @@ -16,6 +16,7 @@ #include "mx.h" #include "copy.h" #include +#include #include "mutt_idna.h" static int address_header_decode (char **str); diff --git a/editmsg.c b/editmsg.c index 9dd05e1..f204456 100644 --- a/editmsg.c +++ b/editmsg.c @@ -10,6 +10,7 @@ /* simple, editor-based message editing */ #include +#include #include "mutt.h" #include "copy.h" diff --git a/handler.c b/handler.c index 7f24f9d..e561363 100644 --- a/handler.c +++ b/handler.c @@ -14,6 +14,8 @@ #include +#include + #include "mutt.h" #include "recvattach.h" #include "handler.h" diff --git a/init.c b/init.c index 9647764..f71f363 100644 --- a/init.c +++ b/init.c @@ -551,7 +551,7 @@ static void syn_del (void** p) { p_delete(p); } -void toggle_quadoption (int opt) +static void toggle_quadoption (int opt) { int n = opt / 4; int b = (opt % 4) * 2; diff --git a/mutt_sasl.h b/mutt_sasl.h index 15a5154..b34b7c1 100644 --- a/mutt_sasl.h +++ b/mutt_sasl.h @@ -28,8 +28,8 @@ typedef struct { const unsigned int *pbufsize; /* read buffer */ - char *buf; - unsigned int blen; + const char *buf; + unsigned blen; unsigned int bpos; /* underlying socket data */ diff --git a/muttlib.c b/muttlib.c index 8a9e34d..2cf42eb 100644 --- a/muttlib.c +++ b/muttlib.c @@ -19,6 +19,8 @@ #include #include +#include + #include "alias.h" #include "mutt.h" #include "mx.h" @@ -367,7 +369,7 @@ void mutt_merge_envelopes(ENVELOPE* base, ENVELOPE** extra) envelope_delete(extra); } -void _mutt_mktemp (char *s, const char *src, int line) +void mutt_mktemp (char *s) { snprintf (s, _POSIX_PATH_MAX, "%s/madmutt-%s-%d-%d-%d-%x%x", NONULL (Tempdir), diff --git a/postpone.c b/postpone.c index 5fa0971..42889e3 100644 --- a/postpone.c +++ b/postpone.c @@ -14,6 +14,9 @@ #include #include +#include + +#include #include "mutt.h" #include "handler.h" diff --git a/protos.h b/protos.h index bd3afee..4ca6313 100644 --- a/protos.h +++ b/protos.h @@ -86,8 +86,7 @@ void mutt_make_post_indent (CONTEXT * ctx, HEADER * cur, FILE * out); void mutt_merge_envelopes (ENVELOPE* base, ENVELOPE** extra); void mutt_message_to_7bit (BODY *, FILE *); -#define mutt_mktemp(a) _mutt_mktemp (a, __FILE__, __LINE__) -void _mutt_mktemp (char *, const char *, int); +void mutt_mktemp (char *); void mutt_prepare_envelope (ENVELOPE *, int); void mutt_unprepare_envelope (ENVELOPE *); void mutt_pretty_mailbox (char *); diff --git a/recvattach.c b/recvattach.c index 07905f9..97cb41a 100644 --- a/recvattach.c +++ b/recvattach.c @@ -16,6 +16,8 @@ #include #include +#include + #include "mutt.h" #include "handler.h" #include "recvattach.h" diff --git a/sort.c b/sort.c index e758174..3e60387 100644 --- a/sort.c +++ b/sort.c @@ -9,6 +9,8 @@ #include +#include + #include "mutt.h" #include "alias.h" #include "sort.h" -- 2.20.1