From a6e6916c1cd0c472d74c7ed27283b3ed0b9aa1ea Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Fri, 28 Dec 2018 11:37:16 -0600 Subject: [PATCH] Fix warning in sl compiler output Use a cast through uintptr_t to un-const rather than a cast through unsigned long. This was caught by the Appeyor Windows build. --- lib/sl/slc-gram.y | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/sl/slc-gram.y b/lib/sl/slc-gram.y index 31ec6bc24..3bf4f4eb4 100644 --- a/lib/sl/slc-gram.y +++ b/lib/sl/slc-gram.y @@ -398,7 +398,7 @@ static void defval_neg_flag(const char *name, struct assignment *defval) static void defval_string(const char *name, struct assignment *defval) { if(defval != NULL) - cprint(1, "opt.%s = (char *)(unsigned long)\"%s\";\n", name, defval->u.value); + cprint(1, "opt.%s = (char *)(uintptr_t)\"%s\";\n", name, defval->u.value); else cprint(1, "opt.%s = NULL;\n", name); } @@ -699,6 +699,7 @@ gen(struct assignment *as) { struct assignment *a; cprint(0, "#include \n"); + cprint(0, "#include \n"); cprint(0, "#include \n"); cprint(0, "#include \n"); cprint(0, "#include \"%s\"\n\n", hname);