Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp52446ybz; Fri, 24 Apr 2020 11:39:55 -0700 (PDT) X-Google-Smtp-Source: APiQypIua2iCyIwY9B16nNqMY1w6TTq7e1g3ad8wvIA7n7Lu9RSwA78gpRk4mnBMtEtceYOX/UOO X-Received: by 2002:a17:906:37d0:: with SMTP id o16mr3310698ejc.368.1587753594975; Fri, 24 Apr 2020 11:39:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587753594; cv=none; d=google.com; s=arc-20160816; b=OG+xykjl8cIl6j9/mGZwfW2pxVNKtK4V0mKEjTICh9Stb9gALYtM3qBfjlC+o/O0Un 4Ix5MezzfAKhpX3MFXcnVscOb+/RmbzeHkFLUXFOK843USRS8pq1Jomlkj1lQkMpKLPD VX7dDra6EFTfLy0w47J/UtPQJuPtFU+mqxMP64vblOeX8G8LMML34qogWmsC3vNr9idN ansxbW+EHxLqQTWu4+cywwLavlkY7Y8AVSxodmHEBYdn/CSG2Ur5dSKYfzH6OnWtJRuR tCX/UC6+33L+nPokqDaY6or3gWZ5y4braQ1T/Db8u+DFrSjRywdvTmDHZ3ZJBxSWFy6y LoOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pRWjt1jNRT9b4RDTw3tQQTwJ2Uu6juw8u/PT0DtCcLI=; b=yTbT15tzZYe20B4VWwpWP1mSjYTytTyIeCfDcXqMmQV82vTZMf9FyE1IOzJo9lyTpa oiTGsonJraw28mMHb1hTKSEY8ihlt9uvfkpO8llKZaBw4q5EfzPrNgragZ3DTXscC1aK yUGE862k7a17BlO2jn8bQ3zFoGB2SghpTM9T6+waUyclTXZTIvrQwUH0tghX8HUR1ohy IRLRsFupAyxTKQ5nppJlt+gGnsOyyGokZKaQoHVWfzIFMi6N9nF0PWS6sci72ChFg8g8 ivrfXgPRWFizYoEI+6Nl394hgLGOr8sNIH3cxn4lmSB02LFZ2kJy49fBVvMPtR2b6pMI 6rmw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QYHgKi1F; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b61si3651999edf.322.2020.04.24.11.39.20; Fri, 24 Apr 2020 11:39:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QYHgKi1F; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728822AbgDXSjS (ORCPT + 99 others); Fri, 24 Apr 2020 14:39:18 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:44018 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726813AbgDXSjS (ORCPT ); Fri, 24 Apr 2020 14:39:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587753557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pRWjt1jNRT9b4RDTw3tQQTwJ2Uu6juw8u/PT0DtCcLI=; b=QYHgKi1FwI4capG+cTaOurAfoZf2zmdITkphUb9/SItbpUmXtOzZBqGGTYRy3LCArqMUsC gDHdLp1ltlzLKHCHVyL3wpUnSkQLUWww/ET7uvnyCzahQrwulwTSfWCrIN3/hjxBvoPP7B Dh4QnYQKrJiOkY6Nw6agwJCo3Dthf+8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-1-9HxYoIRDOBqdQxRokGWk5Q-1; Fri, 24 Apr 2020 14:39:14 -0400 X-MC-Unique: 9HxYoIRDOBqdQxRokGWk5Q-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1B8711800D42 for ; Fri, 24 Apr 2020 18:39:14 +0000 (UTC) Received: from localhost.localdomain (ovpn-114-147.phx2.redhat.com [10.3.114.147]) by smtp.corp.redhat.com (Postfix) with ESMTP id C245960626; Fri, 24 Apr 2020 18:39:13 +0000 (UTC) From: Tom Stellard To: linux-nfs@vger.kernel.org Cc: Tom Stellard Subject: [PATCH 2/2] Use format attribute to silence -Wformat-nonliteral warnings Date: Fri, 24 Apr 2020 18:39:06 +0000 Message-Id: <20200424183906.119687-3-tstellar@redhat.com> In-Reply-To: <20200424183906.119687-1-tstellar@redhat.com> References: <20200424183906.119687-1-tstellar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Content-Transfer-Encoding: quoted-printable Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org This will also cause the compiler to add checks to ensure the arguments are consistent with the printf format. --- support/nfsidmap/libnfsidmap.c | 2 +- utils/gssd/err_util.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/support/nfsidmap/libnfsidmap.c b/support/nfsidmap/libnfsidma= p.c index bce448cf..5d551e4f 100644 --- a/support/nfsidmap/libnfsidmap.c +++ b/support/nfsidmap/libnfsidmap.c @@ -94,7 +94,7 @@ gid_t nobody_gid =3D (gid_t)-1; #endif =20 /* Default logging fuction */ -static void default_logger(const char *fmt, ...) +__attribute__ ((format (printf, 1, 2))) static void default_logger(const= char *fmt, ...) { va_list vp; =20 diff --git a/utils/gssd/err_util.c b/utils/gssd/err_util.c index 2b1132ac..7179cc02 100644 --- a/utils/gssd/err_util.c +++ b/utils/gssd/err_util.c @@ -50,7 +50,7 @@ void initerr(char *progname, int set_verbosity, int set= _fg) } =20 =20 -void printerr(int priority, char *format, ...) +__attribute__ ((format (printf, 2, 3))) void printerr(int priority, char= *format, ...) { va_list args; =20 --=20 2.25.3