Commit 553d8b1c authored by Ronan's avatar Ronan

fix(tester): repare build

parent ab473fee
......@@ -282,21 +282,22 @@ if(MSVC)
list(APPEND STRICT_OPTIONS_CPP "/WX")
endif()
else()
list(APPEND STRICT_OPTIONS_CPP "\
-Wall \
-Wcast-align \
-Wconversion \
-Werror=return-type \
-Wfloat-equal \
-Winit-self \
-Wno-error=deprecated-declarations \
-Woverloaded-virtual \
-Wpointer-arith \
-Wuninitialized \
-Wunused")
list(APPEND STRICT_OPTIONS_CPP
"-Wall"
"-Wcast-align"
"-Wconversion"
"-Werror=return-type"
"-Wfloat-equal"
"-Winit-self"
"-Wno-error=deprecated-declarations"
"-Woverloaded-virtual"
"-Wpointer-arith"
"-Wuninitialized"
"-Wunused"
)
CHECK_CXX_COMPILER_FLAG("-Wsuggest-override" SUGGEST_OVERRIDE)
if (SUGGEST_OVERRIDE)
list(APPEND STRICT_OPTIONS_CPP "-Wsuggest-override -Werror=suggest-override")
list(APPEND STRICT_OPTIONS_CPP "-Wsuggest-override" "-Werror=suggest-override")
endif ()
list(APPEND STRICT_OPTIONS_C "-Wstrict-prototypes" "-Werror=strict-prototypes")
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
......
......@@ -210,6 +210,9 @@ if(APPLE)
endif()
endif()
# TODO: Remove me later!
list(REMOVE_ITEM STRICT_OPTIONS_CPP "-Wconversion" "-Werror=conversion")
bc_apply_compile_flags(SOURCE_FILES_C STRICT_OPTIONS_CPP STRICT_OPTIONS_C)
bc_apply_compile_flags(SOURCE_FILES_CXX STRICT_OPTIONS_CPP STRICT_OPTIONS_CXX)
bc_apply_compile_flags(SOURCE_FILES_OBJC STRICT_OPTIONS_CPP STRICT_OPTIONS_OBJC)
......
......@@ -259,8 +259,8 @@ static LinphoneAddress *account_manager_check_account(AccountManager *m, Linphon
void linphone_core_manager_check_accounts(LinphoneCoreManager *m){
const bctbx_list_t *it;
AccountManager *am=account_manager_get();
int logmask = linphone_core_get_log_level_mask();
unsigned int logmask = linphone_core_get_log_level_mask();
if (!liblinphonetester_show_account_manager_logs) linphone_core_set_log_level_mask(ORTP_ERROR|ORTP_FATAL);
for(it=linphone_core_get_proxy_config_list(m->lc);it!=NULL;it=it->next){
LinphoneProxyConfig *cfg=(LinphoneProxyConfig *)it->data;
......
......@@ -68,9 +68,7 @@ int audio_bypass_read_wav_header_from_fd(wave_header_t *header,int fd){
format_t *format_chunk=&header->format_chunk;
data_t *data_chunk=&header->data_chunk;
unsigned long len=0;
len = read(fd, (char*)riff_chunk, sizeof(riff_t)) ;
ssize_t len = read(fd, (char*)riff_chunk, sizeof(riff_t)) ;
if (len != sizeof(riff_t)){
goto not_a_wav;
}
......@@ -85,7 +83,7 @@ int audio_bypass_read_wav_header_from_fd(wave_header_t *header,int fd){
goto not_a_wav;
}
if ((skip=le_uint32(format_chunk->len)-0x10)>0)
if ((skip=(int)le_uint32(format_chunk->len)-0x10)>0)
{
lseek(fd,skip,SEEK_CUR);
}
......@@ -491,7 +489,7 @@ static void audio_bypass(void) {
call_ok = call(marie, pauline);
BC_ASSERT_TRUE(call_ok);
if (!call_ok) goto end;
BC_ASSERT_STRING_EQUAL(linphone_call_params_get_used_audio_codec(linphone_call_get_current_params(linphone_core_get_current_call(marie_lc)))->mime_type, "L16");
......
......@@ -26,54 +26,51 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include <fcntl.h>
#ifdef _WIN32
# include <io.h>
# ifndef R_OK
# define R_OK 0x2
# endif
# ifndef W_OK
# define W_OK 0x6
# endif
# ifndef F_OK
# define F_OK 0x0
# endif
# ifndef S_IRUSR
# define S_IRUSR S_IREAD
# endif
# ifndef S_IWUSR
# define S_IWUSR S_IWRITE
# endif
# define open _open
# define read _read
# define write _write
# define close _close
# define access _access
# define lseek _lseek
#else /*_WIN32*/
# ifndef O_BINARY
# define O_BINARY 0
# endif
#endif /*!_WIN32*/
#include <io.h>
#ifndef R_OK
#define R_OK 0x2
#endif
#ifndef W_OK
#define W_OK 0x6
#endif
#ifndef F_OK
#define F_OK 0x0
#endif
#ifndef S_IRUSR
#define S_IRUSR S_IREAD
#endif
#ifndef S_IWUSR
#define S_IWUSR S_IWRITE
#endif
#define open _open
#define read _read
#define write _write
#define close _close
#define access _access
#define lseek _lseek
#else
#ifndef O_BINARY
#define O_BINARY 0
#endif
#endif
#ifdef swap16
#else
/* all integer in wav header must be read in least endian order */
static MS2_INLINE uint16_t swap16(uint16_t a)
{
return ((a & 0xFF) << 8) | ((a & 0xFF00) >> 8);
static MS2_INLINE uint16_t swap16(uint16_t a) {
return (uint16_t)(((a & 0xFF) << 8) | ((a & 0xFF00) >> 8));
}
#endif
#ifdef swap32
#else
static MS2_INLINE uint32_t swap32(uint32_t a)
{
return ((a & 0xFF) << 24) | ((a & 0xFF00) << 8) |
((a & 0xFF0000) >> 8) | ((a & 0xFF000000) >> 24);
static MS2_INLINE uint32_t swap32(uint32_t a) {
return (uint32_t)(
((a & 0xFF) << 24) | ((a & 0xFF00) << 8) | ((a & 0xFF0000) >> 8) | ((a & 0xFF000000) >> 24)
);
}
#endif
......@@ -82,9 +79,9 @@ static MS2_INLINE uint32_t swap32(uint32_t a)
#define le_uint16(a) (swap16((a)))
#define le_int16(a) ( (int16_t) swap16((uint16_t)((a))) )
#else
#define le_uint32(a) (a)
#define le_uint16(a) (a)
#define le_int16(a) (a)
#define le_uint32(a) ((uint32_t)(a))
#define le_uint16(a) ((uint16_t)(a))
#define le_int16(a) ((int16_t)(a))
#endif
typedef struct _riff_t {
......
......@@ -425,11 +425,11 @@ public:
~ConferenceEventTester ();
private:
void onConferenceCreated (const Address &addr);
void onConferenceTerminated (const Address &addr);
void onParticipantAdded (const Address &addr);
void onParticipantRemoved (const Address &addr);
void onParticipantSetAdmin (const Address &addr, bool isAdmin);
void onConferenceCreated (const Address &addr) override;
void onConferenceTerminated (const Address &addr) override;
void onParticipantAdded (const Address &addr) override;
void onParticipantRemoved (const Address &addr) override;
void onParticipantSetAdmin (const Address &addr, bool isAdmin) override;
public:
RemoteConferenceEventHandler *handler;
......
This diff is collapsed.
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