Source-Changes-HG archive

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

[src/trunk]: src/external/mit/lua/dist/src lua: fix ftb in lstrlib.c for clang



details:   https://anonhg.NetBSD.org/src/rev/ea9f60f70090
branches:  trunk
changeset: 374459:ea9f60f70090
user:      nikita <nikita%NetBSD.org@localhost>
date:      Sun Apr 23 20:52:39 2023 +0000

description:
lua: fix ftb in lstrlib.c for clang

(error: enumeration values 'Knumber' and 'Kdouble' not handled in switch [-Werror,-Wswitch])

diffstat:

 external/mit/lua/dist/src/lstrlib.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 6e7a54c727db -r ea9f60f70090 external/mit/lua/dist/src/lstrlib.c
--- a/external/mit/lua/dist/src/lstrlib.c       Sun Apr 23 16:49:38 2023 +0000
+++ b/external/mit/lua/dist/src/lstrlib.c       Sun Apr 23 20:52:39 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lstrlib.c,v 1.19 2023/04/16 20:46:17 nikita Exp $      */
+/*     $NetBSD: lstrlib.c,v 1.20 2023/04/23 20:52:39 nikita Exp $      */
 
 /*
 ** Id: lstrlib.c 
@@ -1446,9 +1446,9 @@ typedef enum KOption {
   Kuint,       /* unsigned integers */
 #ifndef _KERNEL
   Kfloat,      /* single-precision floating-point numbers */
-#endif /* _KERNEL */
   Knumber,     /* Lua "native" floating-point numbers */
   Kdouble,     /* double-precision floating-point numbers */
+#endif /* _KERNEL */
   Kchar,       /* fixed-length strings */
   Kstring,     /* strings with prefixed length */
   Kzstr,       /* zero-terminated strings */
@@ -1520,8 +1520,8 @@ static KOption getoption (Header *h, con
     case 'T': *size = sizeof(size_t); return Kuint;
 #ifndef _KERNEL
     case 'f': *size = sizeof(float); return Kfloat;
-#endif /* _KERNEL */
     case 'd': *size = sizeof(double); return Kdouble;
+#endif
 #ifndef _KERNEL
     case 'n': *size = sizeof(lua_Number); return Knumber;
 #else /* _KERNEL */



Home | Main Index | Thread Index | Old Index