From: Alexander Aring Date: Thu, 2 Dec 2021 15:20:36 -0500 Subject: [Cluster-devel] [PATCH dlm-tool 3/6] stonith_helper: Fix gcc build warnings In-Reply-To: <20211202202039.1386193-1-aahringo@redhat.com> References: <20211202202039.1386193-1-aahringo@redhat.com> Message-ID: <20211202202039.1386193-4-aahringo@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Took it from the debian patches. The return value of getopt() is int not char. This patch switches the return value which is stored in variable c to int. Reported-by: Valentin Vidic --- fence/stonith_helper.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fence/stonith_helper.c b/fence/stonith_helper.c index b1db352a..92fe0e5d 100644 --- a/fence/stonith_helper.c +++ b/fence/stonith_helper.c @@ -25,8 +25,7 @@ static int get_options(int argc, char *argv[]) char arg[MAX_ARG_LEN]; char key[MAX_ARG_LEN]; char val[MAX_ARG_LEN]; - char c; - int rv; + int rv, c; if (argc > 1) { while ((c = getopt(argc, argv, "n:t:")) != -1) { -- 2.27.0