Skip to content

Commit cf6e30c

Browse files
backwards compatiblye with g++4.8.5
1 parent bf61565 commit cf6e30c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ set( CMAKE_INCLUDE_CURRENT_DIR ON )
1515
include_directories( program/src/ )
1616

1717
# gcc compiler/linker flags
18-
add_compile_options( -ggdb -Wall -Wextra -Werror -mavx2 -std=c++17 -m64 )
18+
add_compile_options( -ggdb -Wall -Wextra -Werror -mavx2 -std=c++11 -m64 )
1919
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
2020

2121
#

pc/jtree.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void jtree::parse( const char *cptr, size_t sz )
1818

1919
typedef enum { e_start, e_string, e_number, e_keyword } state_t;
2020
state_t st = e_start;
21-
const char *txt, *end = &cptr[sz];
21+
const char *txt=nullptr, *end = &cptr[sz];
2222
for(;;) {
2323
switch(st) {
2424
case e_start: {

pc/misc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ int enc_base64( const uint8_t *inp, int len, uint8_t *out )
239239
int dec_base64( const uint8_t *inp, int len, uint8_t *out )
240240
{
241241
int i = 0, j = 0, decLen = 0;
242-
uint8_t a3[3];
242+
uint8_t a3[3] = { 0,0,0 };
243243
uint8_t a4[4];
244244

245245
while ( len-- ) {

pc/net_socket.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ using namespace pc;
3434
net_buf_alloc::net_buf_alloc()
3535
: ptr_( nullptr )
3636
{
37-
static_assert( sizeof( net_buf ) == 1280);
37+
static_assert( sizeof( net_buf ) == 1280, "unexpected net_buf size");
3838
}
3939

4040
net_buf_alloc::~net_buf_alloc()

0 commit comments

Comments
 (0)