[committed] Fortran: Minor follow-up cleanup to error.cc

Message ID bee2dc14-3c6a-4aa4-8cee-db7bbb83faf9@baylibre.com
State New
Headers
Series [committed] Fortran: Minor follow-up cleanup to error.cc |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gcc_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 fail Patch failed to apply

Commit Message

Tobias Burnus Oct. 23, 2024, 10:30 a.m. UTC
  Committed attached patch as r15-4565-g0ecc45a88d7722. It removes 
'terminal_width', an unused leftover before switching to the common 
diagnostic, which I missed when doing the last cleanup. Best regards, 
Tobias
  

Patch

commit 0ecc45a88d772268a3bd83af02759857da0826d4
Author: Tobias Burnus <tburnus@baylibre.com>
Date:   Wed Oct 23 12:25:00 2024 +0200

    Fortran: Minor follow-up cleanup to error.cc
    
    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.

diff --git a/gcc/fortran/error.cc b/gcc/fortran/error.cc
index 4e60b148a34..b27cbede164 100644
--- a/gcc/fortran/error.cc
+++ b/gcc/fortran/error.cc
@@ -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);
 }