Commit 475d58e7 authored by johan's avatar johan

Fix cmake to actually include the strict compile option

+ some fix on warnings
parent 90483dee
......@@ -63,8 +63,8 @@ else()
endif()
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${STRICT_OPTIONS_C}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${STRICT_OPTIONS_CXX}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${STRICT_OPTIONS_C} ${STRICT_OPTIONS_CPP}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${STRICT_OPTIONS_CXX} ${STRICT_OPTIONS_CPP}")
add_subdirectory(src)
......
......@@ -20,7 +20,7 @@ typedef SSIZE_T ssize_t;
#include <decaf/shake.h>
#include <decaf/sha512.h>
static void usage() {
static void usage(void) {
fprintf(
stderr,
"decaf_shakesum [shake256|shake128|sha3-224|sha3-384|sha3-512|sha512] < infile > outfile\n"
......
......@@ -327,7 +327,7 @@ static void test_ec() {
Point f((FixedBlock<sizeof(enc)>(enc)));
test.fail();
printf(" Allowed deserialize of [1]: %d", f==id);
} catch (CryptoException) {
} catch (CryptoException&) {
/* ok */
}
......@@ -336,7 +336,7 @@ static void test_ec() {
Point f(sqrt_minus_one);
test.fail();
printf(" Allowed deserialize of [i]: %d", f==id);
} catch (CryptoException) {
} catch (CryptoException&) {
/* ok */
}
}
......@@ -346,7 +346,7 @@ static void test_ec() {
Point f(minus_sqrt_minus_one);
test.fail();
printf(" Allowed deserialize of [-i]: %d", f==id);
} catch (CryptoException) {
} catch (CryptoException&) {
/* ok */
}
}
......@@ -365,7 +365,7 @@ static void test_ec() {
try {
point_check(test,p,q,r,0,0,p,Point(p.serialize()),"round-trip");
} catch (CryptoException) {
} catch (CryptoException&) {
test.fail();
printf(" Round-trip raised CryptoException!\n");
}
......@@ -408,7 +408,7 @@ static void test_ec() {
try {
point_check(test,p,q,r,x,0,Point(x.direct_scalarmul(p.serialize())),x*p,"direct mul");
} catch (CryptoException) {
} catch (CryptoException&) {
printf(" Direct mul raised CryptoException!\n");
test.fail();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment