diff options
author | Jim Plank <plank@cs.utk.edu> | 2013-12-29 17:01:42 -0500 |
---|---|---|
committer | Jim Plank <plank@cs.utk.edu> | 2013-12-29 17:01:42 -0500 |
commit | 52376d9cc63fda140e3266cd7f08876dd2556d7d (patch) | |
tree | 271ea840aaa702a5319864b7e69ab7d018ac3a22 /src | |
parent | 88bb18c651e48c527de540564471dff34fdc0d9c (diff) | |
download | gf-complete-52376d9cc63fda140e3266cd7f08876dd2556d7d.tar.gz |
Copmiler errors with %llx.
Diffstat (limited to 'src')
-rw-r--r-- | src/gf_general.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gf_general.c b/src/gf_general.c index 9980c97..5faced9 100644 --- a/src/gf_general.c +++ b/src/gf_general.c @@ -142,23 +142,23 @@ int gf_general_s_to_val(gf_general_t *v, int w, char *s, int hex) if (v->w32 & ~((1 << w)-1)) return 0; return 1; } else if (w <= 64) { - if (hex) return (sscanf(s, "%llx", &(v->w64)) == 1); - return (sscanf(s, "%lld", &(v->w64)) == 1); + if (hex) return (sscanf(s, "%llx", (long long unsigned int *) (&(v->w64))) == 1); + return (sscanf(s, "%lld", (long long int *) (&(v->w64))) == 1); } else { if (!hex) return 0; l = strlen(s); if (l <= 16) { v->w128[0] = 0; - return (sscanf(s, "%llx", &(v->w128[1])) == 1); + return (sscanf(s, "%llx", (long long unsigned int *) (&(v->w128[1]))) == 1); } else { if (l > 32) return 0; save = s[l-16]; s[l-16] = '\0'; - if (sscanf(s, "%llx", &(v->w128[0])) == 0) { + if (sscanf(s, "%llx", (long long unsigned int *) (&(v->w128[0]))) == 0) { s[l-16] = save; return 0; } - return (sscanf(s+(l-16), "%llx", &(v->w128[1])) == 1); + return (sscanf(s+(l-16), "%llx", (long long unsigned int *) (&(v->w128[1]))) == 1); } } } |