]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fortran: Minor follow-up cleanup to error.cc
authorTobias Burnus <tburnus@baylibre.com>
Wed, 23 Oct 2024 10:25:00 +0000 (12:25 +0200)
committerTobias Burnus <tburnus@baylibre.com>
Wed, 23 Oct 2024 10:25:00 +0000 (12:25 +0200)
Follow up to r15-4268-g459c6018d2308d, which removed dead code,
but missing that terminal_width was only set but not used.

gcc/fortran/ChangeLog:

* error.cc (terminal_width, gfc_get_terminal_width): Remove.
(gfc_error_init_1): Do not call one to set the other.

gcc/fortran/error.cc

index 4e60b148a34ce1eb92f59ccee5069e3193e6d6f7..b27cbede1645121d821358a9c219f50d9b3c492a 100644 (file)
@@ -39,8 +39,6 @@ static int suppress_errors = 0;
 
 static bool warnings_not_errors = false;
 
-static int terminal_width;
-
 /* True if the error/warnings should be buffered.  */
 static bool buffered_p;
 
@@ -141,21 +139,11 @@ gfc_query_suppress_errors (void)
 }
 
 
-/* Determine terminal width (for trimming source lines in output).  */
-
-static int
-gfc_get_terminal_width (void)
-{
-  return isatty (STDERR_FILENO) ? get_terminal_width () : INT_MAX;
-}
-
-
 /* Per-file error initialization.  */
 
 void
 gfc_error_init_1 (void)
 {
-  terminal_width = gfc_get_terminal_width ();
   gfc_buffer_error (false);
 }