summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Plank <plank@cs.utk.edu>2013-12-29 17:01:42 -0500
committerJim Plank <plank@cs.utk.edu>2013-12-29 17:01:42 -0500
commit52376d9cc63fda140e3266cd7f08876dd2556d7d (patch)
tree271ea840aaa702a5319864b7e69ab7d018ac3a22
parent88bb18c651e48c527de540564471dff34fdc0d9c (diff)
downloadgf-complete-52376d9cc63fda140e3266cd7f08876dd2556d7d.tar.gz
Copmiler errors with %llx.
-rw-r--r--README6
-rw-r--r--README.txt6
-rw-r--r--src/gf_general.c10
3 files changed, 11 insertions, 11 deletions
diff --git a/README b/README
index 503af3c..048cede 100644
--- a/README
+++ b/README
@@ -7,7 +7,7 @@ There are two online homes for GF-Complete:
- https://bitbucket.org/jimplank/gf-complete
- http://www.cs.utk.edu/~plank/plank/papers/CS-13-716.html
-When compiling this for the first time, cd to flag_tester, and
-do "sh which_compile_flags.sh xxx", where xxx is the compiler
-that you will use in the GNUMakefile.
+To compile, do:
+ ./configure
+ make
diff --git a/README.txt b/README.txt
index 503af3c..048cede 100644
--- a/README.txt
+++ b/README.txt
@@ -7,7 +7,7 @@ There are two online homes for GF-Complete:
- https://bitbucket.org/jimplank/gf-complete
- http://www.cs.utk.edu/~plank/plank/papers/CS-13-716.html
-When compiling this for the first time, cd to flag_tester, and
-do "sh which_compile_flags.sh xxx", where xxx is the compiler
-that you will use in the GNUMakefile.
+To compile, do:
+ ./configure
+ make
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);
}
}
}