shithub: femtolisp

Download patch

ref: 76a63ca19379f4b594159756723ac8739b05b9f9
parent: 39cdb8b036fd676576d3575df6b8c49b47f786ae
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Fri Mar 10 12:59:40 EST 2023

utf8: // fallthrough

--- a/llt/utf8.c
+++ b/llt/utf8.c
@@ -118,12 +118,11 @@
             break;
         ch = 0;
         switch (nb) {
-            /* these fall through deliberately */
-        case 5: ch += (unsigned char)*src++; ch <<= 6;
-        case 4: ch += (unsigned char)*src++; ch <<= 6;
-        case 3: ch += (unsigned char)*src++; ch <<= 6;
-        case 2: ch += (unsigned char)*src++; ch <<= 6;
-        case 1: ch += (unsigned char)*src++; ch <<= 6;
+        case 5: ch += (unsigned char)*src++; ch <<= 6; // fallthrough
+        case 4: ch += (unsigned char)*src++; ch <<= 6; // fallthrough
+        case 3: ch += (unsigned char)*src++; ch <<= 6; // fallthrough
+        case 2: ch += (unsigned char)*src++; ch <<= 6; // fallthrough
+        case 1: ch += (unsigned char)*src++; ch <<= 6; // fallthrough
         case 0: ch += (unsigned char)*src++;
         }
         ch -= offsetsFromUTF8[nb];
@@ -272,12 +271,11 @@
             nb = trailingBytesForUTF8[(unsigned char)sc];
             ch = 0;
             switch (nb) {
-                /* these fall through deliberately */
-            case 5: ch += (unsigned char)*s++; ch <<= 6;
-            case 4: ch += (unsigned char)*s++; ch <<= 6;
-            case 3: ch += (unsigned char)*s++; ch <<= 6;
-            case 2: ch += (unsigned char)*s++; ch <<= 6;
-            case 1: ch += (unsigned char)*s++; ch <<= 6;
+            case 5: ch += (unsigned char)*s++; ch <<= 6; // fallthrough
+            case 4: ch += (unsigned char)*s++; ch <<= 6; // fallthrough
+            case 3: ch += (unsigned char)*s++; ch <<= 6; // fallthrough
+            case 2: ch += (unsigned char)*s++; ch <<= 6; // fallthrough
+            case 1: ch += (unsigned char)*s++; ch <<= 6; // fallthrough
             case 0: ch += (unsigned char)*s++;
             }
             ch -= offsetsFromUTF8[nb];