Skip to content

Commit

Permalink
Remove 'Warning_Mode' global because it is never wrote
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoGGuerrier committed Dec 16, 2024
1 parent 19c129a commit e2b082b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
10 changes: 0 additions & 10 deletions lkql_checker/src/gnatcheck-options.ads
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,6 @@ package Gnatcheck.Options is
KP_Version : GNAT.OS_Lib.String_Access;
-- If set, the relevant GNAT version to check when running gnatkp.

type Warning_Modes is
(Quiet, -- all warnings are suppressed
Short,
Normal,
Full);

Warning_Mode : Warning_Modes := Normal;
-- Specifies the warning message level
-- '-w(q|s|n|f)

Log_Mode : Boolean := False;
-- Create the log file and duplicate in this file all the messages
-- generated by a tool.
Expand Down
4 changes: 1 addition & 3 deletions lkql_checker/src/gnatcheck-output.adb
Original file line number Diff line number Diff line change
Expand Up @@ -543,9 +543,7 @@ package body Gnatcheck.Output is

procedure Warning (Message : String) is
begin
if Arg.Warnings_As_Errors.Get or else Warning_Mode /= Quiet then
Error (Message);
end if;
Error (Message);

-- Force a non-zero return code when "warnings as errors" is enabled
if Arg.Warnings_As_Errors.Get then
Expand Down
2 changes: 1 addition & 1 deletion lkql_checker/src/gnatcheck-output.ads
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ package Gnatcheck.Output is
-- Sends into Stderr the error message with no tool name prefix

procedure Warning (Message : String);
-- Same as Error, but do nothing if Warning_Mode = Quiet.
-- Same as ``Error``

procedure Info (Message : String);
-- Sends Message into Stderr (with no tool name prefix).
Expand Down

0 comments on commit e2b082b

Please sign in to comment.