Pārlūkot izejas kodu

Workaround for unused warning (maybe the code will be removed later)

bel2125 8 gadi atpakaļ
vecāks
revīzija
f2a56b3b06
1 mainītis faili ar 17 papildinājumiem un 17 dzēšanām
  1. 17 17
      src/main.c

+ 17 - 17
src/main.c

@@ -343,22 +343,6 @@ create_config_file(const struct mg_context *ctx, const char *path)
 #endif
 #endif
 
 
 
 
-static unsigned
-hex2dec(char x)
-{
-	if ((x >= '0') && (x <= '9')) {
-		return (unsigned)x - (unsigned)'0';
-	}
-	if ((x >= 'A') && (x <= 'F')) {
-		return (unsigned)x - (unsigned)'A' + 10u;
-	}
-	if ((x >= 'a') && (x <= 'f')) {
-		return (unsigned)x - (unsigned)'a' + 10u;
-	}
-	return 0;
-}
-
-
 static char *
 static char *
 sdup(const char *str)
 sdup(const char *str)
 {
 {
@@ -373,7 +357,23 @@ sdup(const char *str)
 }
 }
 
 
 
 
-#if 0
+#if 0 /* Unused code from "string duplicate with escape" */
+static unsigned
+hex2dec(char x)
+{
+    if ((x >= '0') && (x <= '9')) {
+        return (unsigned)x - (unsigned)'0';
+    }
+    if ((x >= 'A') && (x <= 'F')) {
+        return (unsigned)x - (unsigned)'A' + 10u;
+    }
+    if ((x >= 'a') && (x <= 'f')) {
+        return (unsigned)x - (unsigned)'a' + 10u;
+    }
+    return 0;
+}
+
+
 static char *
 static char *
 sdupesc(const char *str)
 sdupesc(const char *str)
 {
 {