From 7fba76608f4cc1a096d1d109bacfda1dd23ddd47 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 13 May 2022 13:20:46 +0200 Subject: [PATCH] osmo-arfcn: Fix false positive in gcc 12.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pointer is initialized in all its uses, however newer gcc warns about it: """ inlined from ‘main’ at /libosmocore/utils/osmo-arfcn.c:144:16: /usr/include/bits/stdlib-float.h:27:10: error: ‘param’ may be used uninitialized [-Werror=maybe-uninitialized] """ Change-Id: If3eff4ab14a7b2a950386244c9b5f2b9adb32f99 --- utils/osmo-arfcn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/osmo-arfcn.c b/utils/osmo-arfcn.c index 9e4534f43..3d4fb507c 100644 --- a/utils/osmo-arfcn.c +++ b/utils/osmo-arfcn.c @@ -93,7 +93,7 @@ int main(int argc, char **argv) { int arfcn, freq, pcs = 0, uplink = -1; int opt; - char *param; + char *param = NULL; enum program_mode mode = MODE_NONE; while ((opt = getopt(argc, argv, "pa:f:udh")) != -1) {