Commit 52376d9cc63fda140e3266cd7f08876dd2556d7d

Authored by Jim Plank
1 parent 88bb18c6
Exists in master and in 3 other branches v1, v2, v3

Copmiler errors with %llx.

Showing 3 changed files with 11 additions and 11 deletions   Show diff stats
README
... ... @@ -7,7 +7,7 @@ There are two online homes for GF-Complete:
7 7 - https://bitbucket.org/jimplank/gf-complete
8 8 - http://www.cs.utk.edu/~plank/plank/papers/CS-13-716.html
9 9  
10   -When compiling this for the first time, cd to flag_tester, and
11   -do "sh which_compile_flags.sh xxx", where xxx is the compiler
12   -that you will use in the GNUMakefile.
  10 +To compile, do:
13 11  
  12 + ./configure
  13 + make
... ...
README.txt
... ... @@ -7,7 +7,7 @@ There are two online homes for GF-Complete:
7 7 - https://bitbucket.org/jimplank/gf-complete
8 8 - http://www.cs.utk.edu/~plank/plank/papers/CS-13-716.html
9 9  
10   -When compiling this for the first time, cd to flag_tester, and
11   -do "sh which_compile_flags.sh xxx", where xxx is the compiler
12   -that you will use in the GNUMakefile.
  10 +To compile, do:
13 11  
  12 + ./configure
  13 + make
... ...
src/gf_general.c
... ... @@ -142,23 +142,23 @@ int gf_general_s_to_val(gf_general_t *v, int w, char *s, int hex)
142 142 if (v->w32 & ~((1 << w)-1)) return 0;
143 143 return 1;
144 144 } else if (w <= 64) {
145   - if (hex) return (sscanf(s, "%llx", &(v->w64)) == 1);
146   - return (sscanf(s, "%lld", &(v->w64)) == 1);
  145 + if (hex) return (sscanf(s, "%llx", (long long unsigned int *) (&(v->w64))) == 1);
  146 + return (sscanf(s, "%lld", (long long int *) (&(v->w64))) == 1);
147 147 } else {
148 148 if (!hex) return 0;
149 149 l = strlen(s);
150 150 if (l <= 16) {
151 151 v->w128[0] = 0;
152   - return (sscanf(s, "%llx", &(v->w128[1])) == 1);
  152 + return (sscanf(s, "%llx", (long long unsigned int *) (&(v->w128[1]))) == 1);
153 153 } else {
154 154 if (l > 32) return 0;
155 155 save = s[l-16];
156 156 s[l-16] = '\0';
157   - if (sscanf(s, "%llx", &(v->w128[0])) == 0) {
  157 + if (sscanf(s, "%llx", (long long unsigned int *) (&(v->w128[0]))) == 0) {
158 158 s[l-16] = save;
159 159 return 0;
160 160 }
161   - return (sscanf(s+(l-16), "%llx", &(v->w128[1])) == 1);
  161 + return (sscanf(s+(l-16), "%llx", (long long unsigned int *) (&(v->w128[1]))) == 1);
162 162 }
163 163 }
164 164 }
... ...