Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libintl Since ch gets reassigned, it is not certain that...



details:   https://anonhg.NetBSD.org/src/rev/b46edc73004e
branches:  trunk
changeset: 454956:b46edc73004e
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Oct 03 16:37:45 2019 +0000

description:
Since ch gets reassigned, it is not certain that it will be & or | again,
so return an illegal token if it is not instead of telling the compiler
that this is impossible.

diffstat:

 lib/libintl/plural_parser.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 3373929e55c3 -r b46edc73004e lib/libintl/plural_parser.c
--- a/lib/libintl/plural_parser.c       Thu Oct 03 16:35:57 2019 +0000
+++ b/lib/libintl/plural_parser.c       Thu Oct 03 16:37:45 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: plural_parser.c,v 1.2 2007/01/17 23:24:22 hubertf Exp $        */
+/*     $NetBSD: plural_parser.c,v 1.3 2019/10/03 16:37:45 christos Exp $       */
 
 /*-
  * Copyright (c) 2005 Citrus Project,
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: plural_parser.c,v 1.2 2007/01/17 23:24:22 hubertf Exp $");
+__RCSID("$NetBSD: plural_parser.c,v 1.3 2019/10/03 16:37:45 christos Exp $");
 
 #include <assert.h>
 #include <stdio.h>
@@ -188,8 +188,9 @@
                        return T_LAND;
                case '|':
                        return T_LOR;
+               default:
+                       return T_ILTOKEN;
                }
-               /*NOTREACHED*/
        case '=': case '!': case '<': case '>':
                prevch = ch;
                ch = _memstream_getc(&tcx->memstream);



Home | Main Index | Thread Index | Old Index