Loading Makefile +1 −2 Original line number Diff line number Diff line Loading @@ -28,8 +28,7 @@ OPTIMIZE = -O3 WARN = -Wall -Wextra -pedantic # This is necessary because the library depends on # both C99 _and_ POSIX (for the BSD sockets API). #CDEFS += -D_POSIX_C_SOURCE=1 -D_C99_SOURCE=1 CDEFS += -D_POSIX_C_SOURCE=1 CDEFS += -D_POSIX_C_SOURCE=1 -D_C99_SOURCE=1 CFLAGS += -std=c99 -fPIC -g $(WARN) $(CDEFS) $(OPTIMIZE) LIB_INCS = -I$(LIB_DIR) -I$(PUB_INC) -I$(PBC_LIB) -I$(PBC_INC) -I$(VND_INC) Loading Rakefile +2 −2 Original line number Diff line number Diff line Loading @@ -403,8 +403,8 @@ task :all => [ 'cppcheck', 'test_all', 'lib', 'utility', 'run' #'utility', #'run' ] desc "Run full CI build" Loading include/byte_array.h +5 −5 Original line number Diff line number Diff line Loading @@ -13,8 +13,8 @@ * `NULL`-terminated. */ typedef struct _ByteArray { const size_t len; /**< Number of bytes in the `data` field. */ uint8_t* const data; /**< Pointer to an allocated array of data bytes. */ size_t len; /**< Number of bytes in the `data` field. */ uint8_t* data; /**< Pointer to an allocated array of data bytes. */ } ByteArray; /** @brief Convenience macro to represent an empty array with no data */ Loading @@ -32,12 +32,12 @@ ByteArray ByteArray_GetSlice(const ByteArray array, size_t start, size_t len); * byte is consumed, but shall not exceed the `array` length */ typedef struct { const ByteArray array; /**< ByteArray holding allocated array w/length = allocated size */ ByteArray array; /**< ByteArray holding allocated array w/length = allocated size */ size_t bytesUsed; /**< Reflects the number of bytes used from the `array` */ } ByteBuffer; /** @brief Convenience macro to represent an empty buffer with no data */ #define BYTE_BUFFER_NONE (ByteBuffer){.array = BYTE_ARRAY_NONE} #define BYTE_BUFFER_NONE (ByteBuffer){.array = BYTE_ARRAY_NONE, .bytesUsed = 0} ByteBuffer ByteBuffer_Create(void* data, size_t max_len); ByteBuffer ByteBuffer_CreateWithArray(ByteArray array); Loading project.yml +1 −1 Original line number Diff line number Diff line Loading @@ -123,8 +123,8 @@ - -Wall - -Wextra - -pedantic - -D_POSIX_C_SOURCE=1 - -D_C99_SOURCE=1 - -D_DARWIN_C_SOURCE=1 - -c ${1} - -o ${2} :test_linker: Loading src/lib/kinetic_logger.c +9 −8 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ void KineticLogger_Init(const char* logFile) LogToConsole = false; return; } else { FileDesc = fopen(LogFile, "w"); if (FileDesc == NULL) { fprintf(stderr, "Failed to initialize logger with file: " Loading @@ -53,6 +53,7 @@ void KineticLogger_Init(const char* logFile) } } } } void KineticLogger_Close(void) { Loading Loading
Makefile +1 −2 Original line number Diff line number Diff line Loading @@ -28,8 +28,7 @@ OPTIMIZE = -O3 WARN = -Wall -Wextra -pedantic # This is necessary because the library depends on # both C99 _and_ POSIX (for the BSD sockets API). #CDEFS += -D_POSIX_C_SOURCE=1 -D_C99_SOURCE=1 CDEFS += -D_POSIX_C_SOURCE=1 CDEFS += -D_POSIX_C_SOURCE=1 -D_C99_SOURCE=1 CFLAGS += -std=c99 -fPIC -g $(WARN) $(CDEFS) $(OPTIMIZE) LIB_INCS = -I$(LIB_DIR) -I$(PUB_INC) -I$(PBC_LIB) -I$(PBC_INC) -I$(VND_INC) Loading
Rakefile +2 −2 Original line number Diff line number Diff line Loading @@ -403,8 +403,8 @@ task :all => [ 'cppcheck', 'test_all', 'lib', 'utility', 'run' #'utility', #'run' ] desc "Run full CI build" Loading
include/byte_array.h +5 −5 Original line number Diff line number Diff line Loading @@ -13,8 +13,8 @@ * `NULL`-terminated. */ typedef struct _ByteArray { const size_t len; /**< Number of bytes in the `data` field. */ uint8_t* const data; /**< Pointer to an allocated array of data bytes. */ size_t len; /**< Number of bytes in the `data` field. */ uint8_t* data; /**< Pointer to an allocated array of data bytes. */ } ByteArray; /** @brief Convenience macro to represent an empty array with no data */ Loading @@ -32,12 +32,12 @@ ByteArray ByteArray_GetSlice(const ByteArray array, size_t start, size_t len); * byte is consumed, but shall not exceed the `array` length */ typedef struct { const ByteArray array; /**< ByteArray holding allocated array w/length = allocated size */ ByteArray array; /**< ByteArray holding allocated array w/length = allocated size */ size_t bytesUsed; /**< Reflects the number of bytes used from the `array` */ } ByteBuffer; /** @brief Convenience macro to represent an empty buffer with no data */ #define BYTE_BUFFER_NONE (ByteBuffer){.array = BYTE_ARRAY_NONE} #define BYTE_BUFFER_NONE (ByteBuffer){.array = BYTE_ARRAY_NONE, .bytesUsed = 0} ByteBuffer ByteBuffer_Create(void* data, size_t max_len); ByteBuffer ByteBuffer_CreateWithArray(ByteArray array); Loading
project.yml +1 −1 Original line number Diff line number Diff line Loading @@ -123,8 +123,8 @@ - -Wall - -Wextra - -pedantic - -D_POSIX_C_SOURCE=1 - -D_C99_SOURCE=1 - -D_DARWIN_C_SOURCE=1 - -c ${1} - -o ${2} :test_linker: Loading
src/lib/kinetic_logger.c +9 −8 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ void KineticLogger_Init(const char* logFile) LogToConsole = false; return; } else { FileDesc = fopen(LogFile, "w"); if (FileDesc == NULL) { fprintf(stderr, "Failed to initialize logger with file: " Loading @@ -53,6 +53,7 @@ void KineticLogger_Init(const char* logFile) } } } } void KineticLogger_Close(void) { Loading