From: Tonu Naks Date: Thu, 5 Dec 2024 11:34:24 +0000 (+0000) Subject: ada: Silence unused parameter warning on linux X-Git-Tag: basepoints/gcc-16~2981 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4b0a5e936b957ee4e3596a167d7192a1fdf86c9c;p=thirdparty%2Fgcc.git ada: Silence unused parameter warning on linux In __gnat_locate_exec_on_path (char *exec_name, int current_dir_on_windows) the recently added second parameter is for windows only. On non-windows platforms its usage is removed by the preprocessor and the compiler reports unused parameter. gcc/ada/ChangeLog: * adaint.c: void parameter on non-windows platforms --- diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 0b6d4bb6b4e5..0459956ff5ba 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -3110,6 +3110,10 @@ __gnat_locate_exec_on_path (char *exec_name, int current_dir_on_windows) } #else + /* Tell the compiler that we are not going to use this parameter + on non-windows platforms. */ + (void)current_dir_on_windows; + const char *path_val = getenv ("PATH"); /* If PATH is not defined, proceed with __gnat_locate_exec anyway, so we can