From 0a7856895937b0efa63f91227f1140ccf056e447 Mon Sep 17 00:00:00 2001 From: acli Date: Mon, 23 Feb 2004 19:56:47 +0000 Subject: [PATCH] Bit a bit lenient on whether a file name has been set --- misc/translator/VerboseWarnings.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/translator/VerboseWarnings.pm b/misc/translator/VerboseWarnings.pm index 7589176cb6..7a3aad4c0b 100644 --- a/misc/translator/VerboseWarnings.pm +++ b/misc/translator/VerboseWarnings.pm @@ -60,14 +60,14 @@ sub construct_warn_prefix ($$) { die "construct_warn_prefix called before set_application_name" unless defined $appName; die "construct_warn_prefix called before set_input_file_name" - unless defined $input; + unless defined $input || !defined $lc; # be a bit lenient die "construct_warn_prefix called before set_pedantic_mode" unless defined $pedantic_tag; # FIXME: The line number is not accurate, but should be "close enough" # FIXME: This wording is worse than what was there, but it's wrong to # FIXME: hard-code this thing in each warn statement. Need improvement. - return "$appName: $prefix: " . (defined $lc? "$input_abbr: line $lc: ": "$input_abbr: "); + return "$appName: $prefix: " . (defined $lc? "$input_abbr: line $lc: ": defined $input_abbr? "$input_abbr: ": ''); } sub warn_normal ($$) { -- 2.39.5