diff --git a/CMakeLists.txt b/CMakeLists.txt index ef616e9..6c74061 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,17 @@ MESSAGE(STATUS "FTL DISABLE_FTL_APP: " ${DISABLE_FTL_APP}) option(FTL_STATIC_COMPILE "Set to TRUE if you want ftl to be compiled as a static lib. If TRUE, the program will want to statically link to the ftl cmake object." FALSE) MESSAGE(STATUS "FTL FTL_STATIC_COMPILE: " ${FTL_STATIC_COMPILE}) +include(CheckCCompilerFlag) + +if(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "e2k") + foreach(TEST_C_FLAG "-Wno-unused-parameter" "-Wno-pointer-sign" "-Wno-unused-variable" "-Wno-sign-compare" "-Wno-maybe-uninitialized") + CHECK_C_COMPILER_FLAG(${TEST_C_FLAG} C_COMPILER_SUPPORTS_FLAG_${TEST_C_FLAG}) + if(C_COMPILER_SUPPORTS_FLAG_${TEST_C_FLAG}) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TEST_C_FLAG}") + endif() + endforeach() +endif() + find_package(Threads REQUIRED) set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) diff --git a/ftl_app/bitstream.c b/ftl_app/bitstream.c index a2d08d2..4a0a28c 100644 --- a/ftl_app/bitstream.c +++ b/ftl_app/bitstream.c @@ -1,3 +1,4 @@ +#include "dec_obj.h" #include "utils.h" #include "bitstream.h" diff --git a/ftl_app/main.c b/ftl_app/main.c index 7750e50..fe06f5a 100644 --- a/ftl_app/main.c +++ b/ftl_app/main.c @@ -22,6 +22,7 @@ * SOFTWARE. **/ +#include "ftl.h" #include "main.h" #include "gettimeofday.h" #ifdef _WIN32 @@ -34,6 +35,7 @@ #include #include #endif +#include #include "file_parser.h" void sleep_ms(int ms) @@ -425,7 +427,7 @@ static void *ftl_status_thread(void *data) { ftl_packet_stats_msg_t *p = &status.msg.pkt_stats; - printf("Avg packet send per second %3.1f, total nack requests %d\n", + printf("Avg packet send per second %3.1f, total nack requests %ld\n", (float)p->sent * 1000.f / p->period, p->nack_reqs); } diff --git a/libftl/ftl_private.h b/libftl/ftl_private.h index 0606052..402ff4b 100644 --- a/libftl/ftl_private.h +++ b/libftl/ftl_private.h @@ -315,7 +315,7 @@ typedef struct _ftl_ingest_t { typedef struct { ftl_handle_t* handle; - BOOL(*change_bitrate_callback)(void*, uint64_t); + int(*change_bitrate_callback)(void*, uint64_t); void* context; uint64_t initial_encoding_bitrate; uint64_t max_encoding_bitrate; diff --git a/libftl/ingest.c b/libftl/ingest.c index b751c84..40b9bd3 100644 --- a/libftl/ingest.c +++ b/libftl/ingest.c @@ -335,7 +335,7 @@ OS_THREAD_ROUTINE _ingest_get_hosts(ftl_stream_configuration_private_t *ftl) { ftl->ingest_count = total_ingest_cnt; - return total_ingest_cnt; + return (OS_THREAD_ROUTINE)total_ingest_cnt; } char * ingest_find_best(ftl_stream_configuration_private_t *ftl) {