On Thu, Sep 1, 2016 at 10:19 AM, Christian Couder <christian.couder@xxxxxxxxx> wrote: > On Thu, Sep 1, 2016 at 12:20 AM, Stefan Beller <sbeller@xxxxxxxxxx> wrote: >> On Sat, Aug 27, 2016 at 11:45 AM, Christian Couder >> <christian.couder@xxxxxxxxx> wrote: >>> To avoid printing anything when applying with >>> `state->apply_verbosity == verbosity_silent`, let's save the >>> existing warn and error routines before applying, and let's >>> replace them with a routine that does nothing. >>> >>> Then after applying, let's restore the saved routines. >>> >>> Helped-by: Stefan Beller <sbeller@xxxxxxxxxx> >>> Signed-off-by: Christian Couder <chriscool@xxxxxxxxxxxxx> >>> --- >>> apply.c | 21 ++++++++++++++++++++- >>> apply.h | 8 ++++++++ >>> 2 files changed, 28 insertions(+), 1 deletion(-) >>> >>> diff --git a/apply.c b/apply.c >>> index ddbb0a2..bf81b70 100644 >>> --- a/apply.c >>> +++ b/apply.c >>> @@ -112,6 +112,11 @@ void clear_apply_state(struct apply_state *state) >>> /* &state->fn_table is cleared at the end of apply_patch() */ >>> } >>> >>> +static void mute_routine(const char *bla, va_list params) >> >> Instead of 'bla' you could go with 'format' as the man page for >> [f]printf puts it. >> Or you could leave it empty, i.e. >> >> static void mute_routine(const char *, va_list) >> ... > > Ok to do that. Actually I get the following error when doing that: apply.c: In function ‘mute_routine’: apply.c:115:1: error: parameter name omitted static void mute_routine(const char *, va_list) ^ apply.c:115:1: error: parameter name omitted make: *** [apply.o] Error 1 So I will leave it as is.