Fix warnings from the CodePeer. The code structure is essentially:
if A and B then ...
elsif not A and not B then ...
elsif A then ...
elsif B then ... -- this condition is redundant
end if;
and it causes CodePeer to say "exception is raised in a conditional
branch", which most likely means that the condition is redundant.
gcc/ada/
* make.adb (Scan_Make_Arg): Remove redundant condition.
* switch-b.adb (Scan_Debug_Switches): Likewise.
* switch-c.adb (Scan_Front_End_Switches): Likewise.
Make_Failed
("RTS path not valid: missing adainclude directory");
- elsif Lib_Path_Name = null then
+ else pragma Assert (Lib_Path_Name = null);
Make_Failed
("RTS path not valid: missing adalib directory");
end if;
elsif Src_Path_Name = null then
Osint.Fail
("RTS path not valid: missing adainclude directory");
- elsif Lib_Path_Name = null then
+ else pragma Assert (Lib_Path_Name = null);
Osint.Fail
("RTS path not valid: missing adalib directory");
end if;
Osint.Fail ("RTS path not valid: missing "
& "adainclude directory");
- elsif RTS_Lib_Path_Name = null then
+ else pragma Assert (RTS_Lib_Path_Name = null);
Osint.Fail ("RTS path not valid: missing "
& "adalib directory");
end if;