]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
test: removed dead code for unrecognised binary operators
authorHarry Fellowes <harryfellowes1@gmail.com>
Fri, 25 Jul 2025 13:26:38 +0000 (14:26 +0100)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 25 Jul 2025 19:27:39 +0000 (12:27 -0700)
the fallback error in binary_operator() was unreachable, since invalid
binary operators are rejected in three_arguments() via binop() which
returns false and prevents entry into binary_operator().

this dead code was unreachable and safe to remove

ref: line 636 where "binary operator expected" is generated.

Signed-off-by: Harry Fellowes <harryfellowes1@gmail.com>
Copyright-paperwork-exempt: Yes

src/test.c

index 3df6adf28ce5fe08a7eac1e07b7f979fd3aa8be5..d8be5a70bc4d43db6d3fc87e681db8b1f2b608ac 100644 (file)
@@ -353,8 +353,7 @@ binary_operator (bool l_is_l)
           break;
         }
 
-      /* FIXME: is this dead code? */
-      test_syntax_error (_("%s: unknown binary operator"), quote (argv[op]));
+      /* Dead code removed: unrecognised binary operators are filtered before binary_operator() is called, see line 636*/
     }
 
   if (argv[op][0] == '='