From 75d6bd8875010a7e49b77c6913835e6a65f61a18 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Tue, 5 Feb 2019 19:45:19 +0300 Subject: [PATCH] LU-11855 utils: move declarations out of local blocks few variables were declared within local blocks, but used by pointer when blocks are closed. this schema used to work with older GCC (due to trivial stack management), but not with GCC8. Change-Id: Ibd02a72264d50609ccf3c5bc5252e45de4160b9e Signed-off-by: Alex Zhuravlev Reviewed-on: https://review.whamcloud.com/34026 Reviewed-by: James Simmons Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- lustre/utils/obd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/utils/obd.c b/lustre/utils/obd.c index 8435d2f..a9e91d8 100644 --- a/lustre/utils/obd.c +++ b/lustre/utils/obd.c @@ -2996,6 +2996,7 @@ int jt_llog_check(int argc, char **argv) { struct obd_ioctl_data data; char rawbuf[MAX_IOC_BUFLEN], *buf = rawbuf; + char from[2] = "1", to[3] = "-1"; int rc; if (argc != 2 && argc != 4) @@ -3011,7 +3012,6 @@ int jt_llog_check(int argc, char **argv) data.ioc_inllen3 = strlen(argv[3]) + 1; data.ioc_inlbuf3 = argv[3]; } else { - char from[2] = "1", to[3] = "-1"; data.ioc_inllen2 = strlen(from) + 1; data.ioc_inlbuf2 = from; data.ioc_inllen3 = strlen(to) + 1; -- 1.8.3.1