From patchwork Thu Jul 22 16:15:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 12394345 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8383CC6377D for ; Thu, 22 Jul 2021 16:16:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5E4F361287 for ; Thu, 22 Jul 2021 16:16:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229535AbhGVPfY (ORCPT ); Thu, 22 Jul 2021 11:35:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbhGVPfY (ORCPT ); Thu, 22 Jul 2021 11:35:24 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C581C061575 for ; Thu, 22 Jul 2021 09:15:58 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id n4so3671213wms.1 for ; Thu, 22 Jul 2021 09:15:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pwx+1+dsCR4JcJW/IV9mp5L2Vn81NsvrUb0wunmAbLw=; b=tPGhLytzI6sEQrhigQ4uy6CVkxHaMfe4UteyKM/hy6vuih1gi1VqzdliscBVf0rrAt iUSQXDZJhUHQUZK4Pkx8wBve5oOZxqwGt6IozWYSncU7Tt3zzL4Ae05KTfCWSwA+YpI9 KaH2butNZvOS+3SJb3FoGB2cM/kEjOTIbOiy5Jo+2+hVVeXB8d/gg1zb4uKehV9Kae4K cZqxI4mBURzUS2KhzJmPj3sLokvrmBbPnAYgg4d5D+CHoJLrAmP7bj3yWehxTp+FAPi6 Y0FoSt6aOp/JPQBSS6ofKLvx/BNrJGdgt/e62uoYWDSrvI5XIYqC6b9Yy2+Uas5X1gOZ Z3yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pwx+1+dsCR4JcJW/IV9mp5L2Vn81NsvrUb0wunmAbLw=; b=AfR6xt6AMoc+OJJirtr0HeEVZi0ba+R9H7S3j26lNkiGKHEz/0xXctwiJ1WbI4AlN0 ilxZFjvaPXbsMzVfSeIsnGu8HKDpqtahVoPpa4PX9jDYrKLsgAhNa29MCvOy4U+VV1fJ F4Mk3yMJZbXBfmVACM5nE6cv3sH8kksOJrRYT8GYjyoI3+7EuMcESymyVH06Nwku20GG xrNviBm/FUNEOGDU3Xe8fwkKIVuLHaq3mlVsLmVIBXrjI35ldWrVUomgqr39sBhaGDIm 2ckchmBJsKTKkJRM14RjvZ82Nd/fKaNcIAeBRGa4fSkXaHqeupYAcknlFa4GB/WygYN0 PuFw== X-Gm-Message-State: AOAM531WYgd7Qx78prip4L/WL80IzHvrop9apSSu175Vfepspp2BLmwF q+HNHppwDGgd4Bm8XTUTKkHAmUqDiANZ2Q== X-Google-Smtp-Source: ABdhPJxIdOc2hZ8VTcVZlc7vlYHQtiu76X2fHJf5n3Iefy6/hCuNFUaMnGmi3NEySx2gFxSCGbkYpg== X-Received: by 2002:a1c:44d4:: with SMTP id r203mr364029wma.91.1626970556536; Thu, 22 Jul 2021 09:15:56 -0700 (PDT) Received: from dell5510.suse.de (gw.ms-free.net. [95.85.240.250]) by smtp.gmail.com with ESMTPSA id q81sm3528547wme.18.2021.07.22.09.15.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jul 2021 09:15:56 -0700 (PDT) From: Petr Vorel To: linux-nfs@vger.kernel.org Cc: Petr Vorel , Steve Dickson Subject: [nfs-utils PATCH 1/2] nfsdcltrack/sqlite: Fix printf format Date: Thu, 22 Jul 2021 18:15:44 +0200 Message-Id: <20210722161545.26923-1-petr.vorel@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org sqlite.c: In function 'sqlite_remove_unreclaimed': sqlite.c:547:71: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'time_t' {aka 'long long int'} [-Werror=format=] 547 | ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %ld", | ~~^ | | | long int | %lld 548 | grace_start); | ~~~~~~~~~~~ | | | time_t {aka long long int} Found in Buildroot riscv32 build. Link: http://autobuild.buildroot.net/results/9bc1d43a588338b7395af7bc97535ee16a6ea2d9/build-end.log Signed-off-by: Petr Vorel --- utils/nfsdcltrack/sqlite.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/nfsdcltrack/sqlite.c b/utils/nfsdcltrack/sqlite.c index f79aebb3..cea4a411 100644 --- a/utils/nfsdcltrack/sqlite.c +++ b/utils/nfsdcltrack/sqlite.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -544,7 +545,7 @@ sqlite_remove_unreclaimed(time_t grace_start) int ret; char *err = NULL; - ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %ld", + ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %"PRIu64, grace_start); if (ret < 0) { return ret; From patchwork Thu Jul 22 16:15:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 12394347 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E47FC63793 for ; Thu, 22 Jul 2021 16:16:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 157A86128A for ; Thu, 22 Jul 2021 16:16:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229561AbhGVPfZ (ORCPT ); Thu, 22 Jul 2021 11:35:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbhGVPfY (ORCPT ); Thu, 22 Jul 2021 11:35:24 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF321C061757 for ; Thu, 22 Jul 2021 09:15:58 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id p9so1569895wmq.5 for ; Thu, 22 Jul 2021 09:15:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Obsm09FqhMZGle+78ROw0VtmFY/fWA9CVF1JdrgJm54=; b=N1p4ROaOYz3eViri6j/bDnDtyYHNOD2Hg+fxoYmLj2DU6kXzQuKlB+Pn8ZjT0eZz5z qnEb94o8mYBvW/kIyF+53EZU7yDwYpTom5ZI114Cn4vwcaeYTZnAGl7TAx1cfBnUrqfa UX9D4oXR0Y487x1xgeJDMD+QLH/98vO/dbEnvSsPhazPufDpm4jVXbDsePLL0DA6yzYB 05URU2PNC0cLIbv5zKzWvHSqlslwh7n5w9E2GPrUVGbPpvIbtWjHqDAInzoTauJjD7pC kg5aT/dP6netGHTfiLNlY6U9b4knQamn2Uw09Yqedxk8cLYqapk2Q2wHsv560QR0sFTj ZaKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Obsm09FqhMZGle+78ROw0VtmFY/fWA9CVF1JdrgJm54=; b=LpJGtwHxVKm475q0FsRQfVtAQvXEMsDYSgPOTTzEGK5ikAo6+7EFkh3tnh8L17T77E Bl3VZYYxj3EDSS6THnPYI/aPlPf7Dzh3SOEY7q8JcuBSn1Qvz2L5XuPADcJf5+kaLQmp BmUQlUxpprt5Ot3HINRk8v2H+1foOe/JMnOzoLiyJRBhVoG1AIFvz1KiDfD2hylkedXt lgO+8tfHOel7sJ7flr5ZRfAFD46onl4/1GpmBRxHUeTMJcVGPKhKFDyTpgHDZuwuSA58 A5f6kWnGPVoMQ6Z/1FigbZkqWT6W1JlMVV5l08mzbrmlVReeFXVxVq2CM+plYwIlWhy9 /gnA== X-Gm-Message-State: AOAM533cckwFp321erdAOrNGMCoKfejAr2NwjVXEdkJlgpmOxxs3biWK 8j8VViVBM3EutIpjOaYE5EGAOgMScbNGNw== X-Google-Smtp-Source: ABdhPJweL2iu096DL+nQhUsFX9svpmim42gfV3cRJjVmOeGwtMCUeXmUt1SzCi5AflTs2sriT1e96w== X-Received: by 2002:a7b:c778:: with SMTP id x24mr360525wmk.77.1626970557427; Thu, 22 Jul 2021 09:15:57 -0700 (PDT) Received: from dell5510.suse.de (gw.ms-free.net. [95.85.240.250]) by smtp.gmail.com with ESMTPSA id q81sm3528547wme.18.2021.07.22.09.15.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jul 2021 09:15:57 -0700 (PDT) From: Petr Vorel To: linux-nfs@vger.kernel.org Cc: Petr Vorel , Steve Dickson Subject: [nfs-utils PATCH 2/2] nfsdcltrack/nfsdcltrack.c: Fix printf format Date: Thu, 22 Jul 2021 18:15:45 +0200 Message-Id: <20210722161545.26923-2-petr.vorel@gmail.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210722161545.26923-1-petr.vorel@gmail.com> References: <20210722161545.26923-1-petr.vorel@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org nfsdcltrack.c: In function 'cltrack_gracedone': nfsdcltrack.c:528:47: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'time_t' {aka 'long long int'} [-Werror=format=] 528 | xlog(D_GENERAL, "%s: grace done. gracetime=%ld", __func__, gracetime); | ~~^ ~~~~~~~~~ | | | | long int time_t {aka long long int} | %lld Found in Buildroot riscv32 build. Link: http://autobuild.buildroot.net/results/9bc1d43a588338b7395af7bc97535ee16a6ea2d9/build-end.log Signed-off-by: Petr Vorel --- utils/nfsdcltrack/nfsdcltrack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/nfsdcltrack/nfsdcltrack.c b/utils/nfsdcltrack/nfsdcltrack.c index e926f1c0..0b37c094 100644 --- a/utils/nfsdcltrack/nfsdcltrack.c +++ b/utils/nfsdcltrack/nfsdcltrack.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -525,7 +526,7 @@ cltrack_gracedone(const char *timestr) if (*tail) return -EINVAL; - xlog(D_GENERAL, "%s: grace done. gracetime=%ld", __func__, gracetime); + xlog(D_GENERAL, "%s: grace done. gracetime=%"PRIu64, __func__, gracetime); ret = sqlite_remove_unreclaimed(gracetime);