Commit 4d6d00fb authored by François Grisez's avatar François Grisez Committed by Erwan Croze

Enable strict compilation flags

parent 77861beb
......@@ -38,6 +38,7 @@ include(FeatureSummary)
include(CheckCXXSourceCompiles)
include(GNUInstallDirs)
option(ENABLE_STRICT "Pass strict flags to the compiler" YES)
option(ENABLE_DATEHANDLER "Build DateHandler module" NO)
option(ENABLE_DOC "Build documentation" YES)
option(ENABLE_MONOTONIC_CLOCK_REGISTRATIONS "Enable monotonic clock for registrations" NO)
......@@ -271,6 +272,8 @@ configure_file(${PROJECT_SOURCE_DIR}/cmake/flexisip-config.h.in ${PROJECT_BINARY
set_source_files_properties(${PROJECT_BINARY_DIR}/flexisip-config.h PROPERTIES GENERATED ON)
add_definitions("-DHAVE_CONFIG_H")
bc_init_compilation_flags(CPP_BUILD_FLAGS C_BUILD_FLAGS CXX_BUILD_FLAGS ENABLE_STRICT)
add_subdirectory(src)
add_subdirectory(scripts)
......
......@@ -222,6 +222,12 @@ message(STATUS "Flexisip LIBS : ${FLEXISIP_LIBS}")
message(STATUS "Flexisip INCLUDES : ${FLEXISIP_INCLUDES}")
message(STATUS "Flexisip DEPENDENCIES : ${FLEXISIP_DEPENDENCIES}")
bc_apply_compile_flags(FLEXISIP_SOURCES CPP_BUILD_FLAGS CXX_BUILD_FLAGS)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set_source_files_properties(cJSON.c PROPERTIES COMPILE_FLAGS "-Wno-error=misleading-indentation")
set_source_files_properties(stun/stun.c PROPERTIES COMPILE_FLAGS "-Wno-error=sign-compare")
endif()
add_library(flexisip SHARED ${FLEXISIP_SOURCES})
set_property(TARGET flexisip PROPERTY CXX_STANDARD 11)
set_property(TARGET flexisip PROPERTY CXX_STANDARD_REQUIRED ON)
......
......@@ -519,9 +519,8 @@ void Agent::loadConfig(GenericManager *cm) {
(*it)->checkConfig();
(*it)->load();
}
if (mDrm)
mDrm->load(mPassphrase);
mPassphrase = "";
if (mDrm) mDrm->load(mPassphrase);
mPassphrase = "";
}
void Agent::unloadConfig() {
......
......@@ -86,8 +86,8 @@ SipEvent::SipEvent(const shared_ptr<OutgoingAgent> &outAgent, const shared_ptr<M
mIncomingAgent = mAgent->shared_from_this();
}
SipEvent::SipEvent(const SipEvent &sipEvent)
: mCurrModule(sipEvent.mCurrModule), mIncomingAgent(sipEvent.mIncomingAgent),
SipEvent::SipEvent(const SipEvent &sipEvent): enable_shared_from_this<SipEvent>(),
mCurrModule(sipEvent.mCurrModule), mIncomingAgent(sipEvent.mIncomingAgent),
mOutgoingAgent(sipEvent.mOutgoingAgent), mAgent(sipEvent.mAgent), mState(sipEvent.mState) {
LOGD("New SipEvent %p with state %s", this, stateStr(mState).c_str());
// make a copy of the msgsip when the SipEvent is copy-constructed
......
......@@ -17,6 +17,7 @@
*/
#include <stdint.h>
#include <bctoolbox/defs.h>
#include "h264iframefilter.hh"
#define TYPE_IDR 5
......@@ -44,6 +45,7 @@ bool H264IFrameFilter::onOutgoingTransfer(uint8_t *data, size_t size, const sock
switch (ptype) {
case TYPE_IDR:
isIFrame = true;
BCTBX_NO_BREAK;
case TYPE_PPS:
case TYPE_SPS:
ret = true;
......@@ -54,6 +56,7 @@ bool H264IFrameFilter::onOutgoingTransfer(uint8_t *data, size_t size, const sock
switch (nal_header_get_type(p)) {
case TYPE_IDR:
isIFrame = true;
BCTBX_NO_BREAK;
case TYPE_PPS:
case TYPE_SPS:
ret = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment