Skip to content

Commit 17ca7cc

Browse files
committed
compile fix
1 parent 8dcd702 commit 17ca7cc

File tree

5 files changed

+9
-18
lines changed

5 files changed

+9
-18
lines changed

dist/common/FindHeatshrink.cmake

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ set_source_files_properties(${heatshrink_src} PROPERTIES GENERATED 1)
5050

5151
if(MSVC)
5252
target_compile_options(heatshrink PRIVATE /W1)
53-
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
54-
target_compile_options(heatshrink PUBLIC /MTd)
55-
else()
56-
target_compile_options(heatshrink PUBLIC /MT)
57-
endif()
5853
endif()
5954

6055
target_include_directories(

dist/common/FindTinyAES.cmake

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@ set_source_files_properties(${tinyaes_src} PROPERTIES GENERATED 1)
4545

4646
if(MSVC)
4747
target_compile_options(tinyaes PRIVATE /W1)
48-
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
49-
target_compile_options(tinyaes PUBLIC /MTd)
50-
else()
51-
target_compile_options(tinyaes PUBLIC /MT)
52-
endif()
5348
endif()
5449

5550
target_include_directories(

examples/lossy_sync/main.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
* channel.
99
*/
1010

11+
#define _CRT_SECURE_NO_WARNINGS 1
12+
1113
#include "ExampleSync.h"
1214

1315
#include <array>
@@ -196,13 +198,14 @@ static Arguments parse_arguments(int argc, char** argv)
196198
case 'e': {
197199
// flawfinder: ignore
198200
FILE* f = fopen(optarg, "rb");
199-
args.key.resize(stored::Aes256Layer::KeySize);
200201

201202
if(!f) {
202203
log("Cannot open key file '%s'; %s\n", optarg, strerror(errno));
203204
STORED_throw(std::invalid_argument{"Cannot open key file"});
204205
}
205206

207+
args.key.resize(stored::Aes256Layer::KeySize);
208+
206209
if(fread(&args.key[0], stored::Aes256Layer::KeySize, 1, f) != 1) {
207210
log("Cannot read key file '%s'; %s\n", optarg, strerror(errno));
208211
fclose(f);

include/libstored/protocol.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,11 @@ class Crc32Layer : public ProtocolLayer {
957957
public:
958958
typedef ProtocolLayer base;
959959

960-
enum STORED_ANONYMOUS {
960+
enum STORED_ANONYMOUS
961+
# if STORED_cplusplus >= 201103L
962+
: uint32_t
963+
# endif
964+
{
961965
polynomial = 0x04c11db7,
962966
init = 0xffffffff,
963967
final_xor = 0xffffffff

tests/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ set(LIBSTORED_DRAFT_API "ON")
1515

1616
if(MSVC)
1717
add_compile_options(/W1 /WX)
18-
19-
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
20-
add_compile_options(/MTd)
21-
else()
22-
add_compile_options(/MT)
23-
endif()
2418
else()
2519
add_compile_options(
2620
-Wall

0 commit comments

Comments
 (0)