Browse Source

Fix compiler warning.

Reported by Myriachan.
Mike Pall 2 years ago
parent
commit
8c20c3b1a3
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/host/buildvm_lib.c

+ 2 - 1
src/host/buildvm_lib.c

@@ -319,7 +319,8 @@ void emit_lib(BuildCtx *ctx)
       char *p;
       /* Simplistic pre-processor. Only handles top-level #if/#endif. */
       if (buf[0] == '#' && buf[1] == 'i' && buf[2] == 'f') {
-	int ok = 1, len = strlen(buf);
+	int ok = 1;
+	size_t len = strlen(buf);
 	if (buf[len-1] == '\n') {
 	  buf[len-1] = 0;
 	  if (buf[len-2] == '\r') {