• Bug#1066576: nagios-plugins-contrib: FTBFS: check_memcached.l:339:37: e

    From Sebastian Andrzej Siewior@21:1/5 to All on Sat Mar 23 09:30:01 2024
    control -1 tags patch

    the patch attached fixes the warnings in check_memcached.l.

    Sebastian

    From 155e35ace12f41bbaa42e4ea19bfea6de416bd95 Mon Sep 17 00:00:00 2001
    From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
    Date: Fri, 22 Mar 2024 19:48:09 +0100
    Subject: [PATCH] Compile warnings.

    Address various compile warnings in check_memcached.

    Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
    ---
    check_memcached/check_memcached.l | 14 +++++++-------
    common.mk | 2 +-
    2 files changed, 8 insertions(+), 8 deletions(-)

    --- a/check_memcached/check_memcached.l
    +++ b/check_memcached/check_memcached.l
    @@ -152,7 +152,7 @@ cmd_set= { save_to = &obj_cmd_set; }
    %%
    /* ==================================================================================================== */

    -yywrap() {
    +int yywrap(void) {
    return 1;
    }

    @@ -343,7 +343,7 @@ int check_memcached() {
    }

    if ( nagios_service_output == NULL ) {
    - str_bytes = asprintf(&nagios_service_output,"");
    + str_bytes = asprintf(&nagios_service_output," ");
    }
    /* ----------------------------------------------------------------------------------------- */
    /* ---- Analyze the stats, return 0,1,2 as required ---------------------------------------- */
    @@ -351,7 +351,7 @@ int check_memcached() {
    if ( obj_time == 0 ) {
    nagios_service_tmp = nagios_service_output;
    str_bytes = asprintf(&nagi