From e516b0a9b879c5e6da11bfe01057570a6c914e48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Creuse?= Date: Mon, 12 Dec 2022 16:16:50 +0100 Subject: [PATCH] TGen: fix unreferenced variable warning The unused constant had no effect as it was used as a default when the templates_dir parameter is not provided when creating the libgen context, but all uses of that context explicitly passed the corresponding parameter. Fixes issue libadalang-tools#1 --- src/tgen/tgen-libgen.adb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tgen/tgen-libgen.adb b/src/tgen/tgen-libgen.adb index cdbee1bb..7d683ff6 100644 --- a/src/tgen/tgen-libgen.adb +++ b/src/tgen/tgen-libgen.adb @@ -308,14 +308,15 @@ package body TGen.Libgen is (if Root_Templates_Dir = "" then Ada.Directories.Containing_Directory (GNAT.OS_Lib.Locate_Exec_On_Path - (Ada.Command_Line.Command_Name).all) - else Root_Templates_Dir) & "/../share/tgen/templates"; + (Ada.Command_Line.Command_Name).all + & "/../share/tgen/templates") + else Root_Templates_Dir); -- Try to find the templates in the canonical installation path if not -- supplied. begin return (Output_Dir => To_Unbounded_String (Output_Dir), - Root_Templates_Dir => To_Unbounded_String (Root_Templates_Dir), + Root_Templates_Dir => To_Unbounded_String (Actual_Templates_Dir), User_Project_Path => To_Unbounded_String (User_Project_Path), others => <>); end Create;