diff options
Diffstat (limited to 'Build/source/utils/t1utils/TLpatches/patch-03-warnings')
-rw-r--r-- | Build/source/utils/t1utils/TLpatches/patch-03-warnings | 63 |
1 files changed, 18 insertions, 45 deletions
diff --git a/Build/source/utils/t1utils/TLpatches/patch-03-warnings b/Build/source/utils/t1utils/TLpatches/patch-03-warnings index f945094761a..ae2f72f454c 100644 --- a/Build/source/utils/t1utils/TLpatches/patch-03-warnings +++ b/Build/source/utils/t1utils/TLpatches/patch-03-warnings @@ -1,42 +1,43 @@ Avoid compiler warnings (gcc's -Wcast-qual). -diff -ur t1utils-1.39.orig/clp.c t1utils-1.39/clp.c ---- t1utils-1.39.orig/clp.c 2014-12-11 18:20:22.000000000 +0100 -+++ t1utils-1.39/clp.c 2015-03-02 08:50:06.829885555 +0100 -@@ -1075,21 +1075,27 @@ - parse_int(Clp_Parser *clp, const char *arg, int complain, void *user_data) +diff -ur t1utils-1.41.orig/clp.c t1utils-1.41/clp.c +--- t1utils-1.41.orig/clp.c Thu Aug 17 00:20:27 2017 ++++ t1utils-1.41/clp.c Mon Aug 28 14:14:04 2017 +@@ -1095,22 +1095,28 @@ + parse_int(Clp_Parser* clp, const char* arg, int complain, void* user_data) { const char *val; + char *temp; + uintptr_t type = (uintptr_t) user_data; if (*arg == 0 || isspace((unsigned char) *arg) - || (user_data != 0 && *arg == '-')) + || ((type & 1) && *arg == '-')) val = arg; - else if (user_data != 0) { /* unsigned */ + else if (type & 1) { /* unsigned */ #if HAVE_STRTOUL -- clp->val.u = strtoul(arg, (char **) &val, 0); -+ clp->val.u = strtoul(arg, &temp, 0); +- clp->val.ul = strtoul(arg, (char **) &val, 0); ++ clp->val.ul = strtoul(arg, &temp, 0); + val = temp; #else /* don't bother really trying to do it right */ if (arg[0] == '-') val = arg; - else -- clp->val.u = strtol(arg, (char **) &val, 0); +- clp->val.l = strtol(arg, (char **) &val, 0); + else { -+ clp->val.u = strtol(arg, &temp, 0); ++ clp->val.l = strtol(arg, &temp, 0); + val = temp; + } #endif - } else -- clp->val.i = strtol(arg, (char **) &val, 0); +- clp->val.l = strtol(arg, (char **) &val, 0); + } else { -+ clp->val.i = strtol(arg, &temp, 0); ++ clp->val.l = strtol(arg, &temp, 0); + val = temp; + } + if (type <= 1) + clp->val.u = (unsigned) clp->val.ul; if (*arg != 0 && *val == 0) - return 1; - else if (complain) { -@@ -1105,11 +1111,14 @@ +@@ -1130,11 +1136,14 @@ parse_double(Clp_Parser *clp, const char *arg, int complain, void *user_data) { const char *val; @@ -52,32 +53,4 @@ diff -ur t1utils-1.39.orig/clp.c t1utils-1.39/clp.c + } if (*arg != 0 && *val == 0) return 1; - else if (complain) -diff -ur t1utils-1.39.orig/t1disasm.c t1utils-1.39/t1disasm.c ---- t1utils-1.39.orig/t1disasm.c 2015-02-26 21:25:22.000000000 +0100 -+++ t1utils-1.39/t1disasm.c 2015-03-02 08:50:06.000000000 +0100 -@@ -302,11 +302,11 @@ - /* 23.Feb.2004 - use 'memstr', not strstr, because the strings input to - eexec_line aren't null terminated! Reported by Werner Lemberg. */ - --static const unsigned char * --oog_memstr(const unsigned char *line, int line_len, const char *pattern, int pattern_len) -+static unsigned char * -+oog_memstr(unsigned char *line, int line_len, const char *pattern, int pattern_len) - { -- const unsigned char *try; -- const unsigned char *last = line + line_len - pattern_len + 1; -+ unsigned char *try; -+ unsigned char *last = line + line_len - pattern_len + 1; - while (line < last - && (try = memchr(line, (unsigned char)*pattern, last - line))) { - if (memcmp(try, pattern, pattern_len) == 0) -@@ -401,7 +401,7 @@ - badly: a charstring definition follows "/Charstrings ... begin", ON THE - SAME LINE. */ - { -- const char *CharStrings = (const char *) -+ char *CharStrings = (char *) - oog_memstr(line, line_len, "/CharStrings ", 13); - int crap, n; - char should_be_slash = 0; + else { |