Loading project.yml +14 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,8 @@ :support: - test/support/** :source: - src/lib/*.c - src/lib/** - src/utility/** - vendor/protobuf-c/protobuf-c/protobuf-c.c - vendor/socket99/socket99.c :include: Loading Loading @@ -99,7 +100,11 @@ - -D"$": DEFINES_TEST_PREPROCESS - -DGNU_COMPILER - -std=c99 - -g - -Wall - -Wextra - -pedantic - -D_POSIX_C_SOURCE=1 - ${1} :test_compiler: :executable: gcc Loading @@ -109,8 +114,11 @@ - -D"$": COLLECTION_DEFINES_TEST_AND_VENDOR - -DGNU_COMPILER - -std=c99 - -Wall - -g - -Wall - -Wextra - -pedantic - -D_POSIX_C_SOURCE=1 - -c ${1} - -o ${2} :test_linker: Loading @@ -136,7 +144,11 @@ - -D"$": 'COLLECTION_DEFINES_RELEASE_AND_VENDOR' - -DGNU_COMPILER - -std=c99 - -g - -Wall - -Wextra - -pedantic - -D_POSIX_C_SOURCE=1 - "-c \"${1}\"" - "-o \"${2}\"" :release_linker: Loading src/lib/kinetic_client.c +2 −0 Original line number Diff line number Diff line Loading @@ -117,10 +117,12 @@ KineticOperation KineticClient_CreateOperation( } KineticPDU_Init(request, connection); KINETIC_PDU_INIT_WITH_MESSAGE(request, connection); KineticPDU_Init(response, connection); op.connection = connection; op.request = request; op.request->proto = &op.request->protoData.message.proto; op.response = response; return op; Loading src/lib/kinetic_logger.c +3 −4 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ void KineticLogger_Log(const char* message) } FileDesc = LogToConsole ? stderr : fopen(LogFile, "a"); if (FileDesc >= 0) if (FileDesc != NULL) { fprintf(FileDesc, "%s\n", message); fflush(FileDesc); Loading Loading @@ -372,7 +372,6 @@ void KineticLogger_LogStatus(KineticProto_Status* status) // Output detailed message, if supplied if (status->has_detailedMessage) { int i; char tmp[8], msg[256]; const ProtobufCFieldDescriptor* statusDetailedMsgFieldDescriptor = protobuf_c_message_descriptor_get_field_by_name( Loading @@ -382,7 +381,7 @@ void KineticLogger_LogStatus(KineticProto_Status* status) statusDetailedMsgFieldDescriptor->descriptor; sprintf(msg, " %s: ", statusDetailedMsgDescriptor->name); for (i = 0; i < status->detailedMessage.len; i++) for (size_t i = 0; i < status->detailedMessage.len; i++) { sprintf(tmp, "%02hhX", status->detailedMessage.data[i]); strcat(msg, tmp); Loading @@ -400,7 +399,7 @@ void KineticLogger_LogByteArray(const char* title, ByteArray bytes) const int lineLen = 4 + (bytesPerLine * byteChars); char hex[lineLen+1]; char ascii[lineLen+1]; for (int i = 0; i < bytes.len;) for (size_t i = 0; i < bytes.len;) { hex[0] = '\0'; ascii[0] = '\0'; Loading src/lib/kinetic_logger.h +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ void KineticLogger_LogStatus(KineticProto_Status* status); void KineticLogger_LogByteArray(const char* title, ByteArray bytes); #define LOG(message) KineticLogger_Log(message) #define LOGF(message, ...) KineticLogger_LogPrintf(message, ##__VA_ARGS__) #define LOGF(message, ...) KineticLogger_LogPrintf(message, __VA_ARGS__) #define LOG_LOCATION KineticLogger_LogPrintf("@ %s:%s:%d", __func__, __FILE__, __LINE__) #endif // _KINETIC_LOGGER_H src/lib/kinetic_nbo.c +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ static uint64_t KineticNBO_SwapByteOrder(uint8_t* pByte, size_t len) { uint64_t swapped = 0u; for (int i = 0; i < len; i++) for (size_t i = 0; i < len; i++) { swapped = (swapped << 8) | pByte[i]; } Loading Loading
project.yml +14 −2 Original line number Diff line number Diff line Loading @@ -25,7 +25,8 @@ :support: - test/support/** :source: - src/lib/*.c - src/lib/** - src/utility/** - vendor/protobuf-c/protobuf-c/protobuf-c.c - vendor/socket99/socket99.c :include: Loading Loading @@ -99,7 +100,11 @@ - -D"$": DEFINES_TEST_PREPROCESS - -DGNU_COMPILER - -std=c99 - -g - -Wall - -Wextra - -pedantic - -D_POSIX_C_SOURCE=1 - ${1} :test_compiler: :executable: gcc Loading @@ -109,8 +114,11 @@ - -D"$": COLLECTION_DEFINES_TEST_AND_VENDOR - -DGNU_COMPILER - -std=c99 - -Wall - -g - -Wall - -Wextra - -pedantic - -D_POSIX_C_SOURCE=1 - -c ${1} - -o ${2} :test_linker: Loading @@ -136,7 +144,11 @@ - -D"$": 'COLLECTION_DEFINES_RELEASE_AND_VENDOR' - -DGNU_COMPILER - -std=c99 - -g - -Wall - -Wextra - -pedantic - -D_POSIX_C_SOURCE=1 - "-c \"${1}\"" - "-o \"${2}\"" :release_linker: Loading
src/lib/kinetic_client.c +2 −0 Original line number Diff line number Diff line Loading @@ -117,10 +117,12 @@ KineticOperation KineticClient_CreateOperation( } KineticPDU_Init(request, connection); KINETIC_PDU_INIT_WITH_MESSAGE(request, connection); KineticPDU_Init(response, connection); op.connection = connection; op.request = request; op.request->proto = &op.request->protoData.message.proto; op.response = response; return op; Loading
src/lib/kinetic_logger.c +3 −4 Original line number Diff line number Diff line Loading @@ -67,7 +67,7 @@ void KineticLogger_Log(const char* message) } FileDesc = LogToConsole ? stderr : fopen(LogFile, "a"); if (FileDesc >= 0) if (FileDesc != NULL) { fprintf(FileDesc, "%s\n", message); fflush(FileDesc); Loading Loading @@ -372,7 +372,6 @@ void KineticLogger_LogStatus(KineticProto_Status* status) // Output detailed message, if supplied if (status->has_detailedMessage) { int i; char tmp[8], msg[256]; const ProtobufCFieldDescriptor* statusDetailedMsgFieldDescriptor = protobuf_c_message_descriptor_get_field_by_name( Loading @@ -382,7 +381,7 @@ void KineticLogger_LogStatus(KineticProto_Status* status) statusDetailedMsgFieldDescriptor->descriptor; sprintf(msg, " %s: ", statusDetailedMsgDescriptor->name); for (i = 0; i < status->detailedMessage.len; i++) for (size_t i = 0; i < status->detailedMessage.len; i++) { sprintf(tmp, "%02hhX", status->detailedMessage.data[i]); strcat(msg, tmp); Loading @@ -400,7 +399,7 @@ void KineticLogger_LogByteArray(const char* title, ByteArray bytes) const int lineLen = 4 + (bytesPerLine * byteChars); char hex[lineLen+1]; char ascii[lineLen+1]; for (int i = 0; i < bytes.len;) for (size_t i = 0; i < bytes.len;) { hex[0] = '\0'; ascii[0] = '\0'; Loading
src/lib/kinetic_logger.h +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ void KineticLogger_LogStatus(KineticProto_Status* status); void KineticLogger_LogByteArray(const char* title, ByteArray bytes); #define LOG(message) KineticLogger_Log(message) #define LOGF(message, ...) KineticLogger_LogPrintf(message, ##__VA_ARGS__) #define LOGF(message, ...) KineticLogger_LogPrintf(message, __VA_ARGS__) #define LOG_LOCATION KineticLogger_LogPrintf("@ %s:%s:%d", __func__, __FILE__, __LINE__) #endif // _KINETIC_LOGGER_H
src/lib/kinetic_nbo.c +1 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ static uint64_t KineticNBO_SwapByteOrder(uint8_t* pByte, size_t len) { uint64_t swapped = 0u; for (int i = 0; i < len; i++) for (size_t i = 0; i < len; i++) { swapped = (swapped << 8) | pByte[i]; } Loading