Commit e86b99fd authored by Ronan's avatar Ronan

fix(bzrtp): disable new gcc 8 -Wcast-function-type warnings (FIXME in the future)

parent 1b943ed3
Pipeline #19 passed with stage
in 0 seconds
......@@ -568,6 +568,11 @@ void bzrtp_resetSASVerified(bzrtpContext_t *zrtpContext) {
}
}
/* FIXME: Temporary workaround for -Wcast-function-type. */
#if __GNUC__ >= 8
_Pragma("GCC diagnostic push")
_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
#endif // if __GNUC__ >= 8
/*
* @brief Allow client to compute an exported according to RFC section 4.5.2
......@@ -623,6 +628,10 @@ int bzrtp_exportKey(bzrtpContext_t *zrtpContext, char *label, size_t labelLength
return 0;
}
#if __GNUC__ >= 8
_Pragma("GCC diagnostic pop")
#endif // if __GNUC__ >= 8
/*
* @brief Reset the retransmission timer of a given channel.
* Packets will be sent again if appropriate:
......
......@@ -1803,6 +1803,12 @@ int bzrtp_responseToHelloMessage(bzrtpContext_t *zrtpContext, bzrtpChannelContex
return 0;
}
/* FIXME: Temporary workaround for -Wcast-function-type. */
#if __GNUC__ >= 8
_Pragma("GCC diagnostic push")
_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
#endif // if __GNUC__ >= 8
/**
* @brief After the DHPart1 or DHPart2 arrives from peer, validity check and shared secret computation
* call this function to compute s0, KDF Context, ZRTPSess,
......@@ -2301,3 +2307,7 @@ int bzrtp_updateCachedSecrets(bzrtpContext_t *zrtpContext, bzrtpChannelContext_t
return 0;
}
#if __GNUC__ >= 8
_Pragma("GCC diagnostic pop")
#endif // if __GNUC__ >= 8
......@@ -73,8 +73,13 @@ uint8_t patternKDFContext[KDF_TEST_NUMBER][56] = {
{0xf0, 0x1f, 0x24, 0x02, 0x00, 0x00, 0x00, 0x00, 0x80, 0x24, 0xad, 0xfb, 0x94, 0xa9, 0x06, 0x90, 0xcf, 0x9c, 0xed, 0x13, 0x99, 0x8c, 0x51, 0x34, 0x7d, 0xc4, 0x35, 0xa7, 0x4d, 0x75, 0x25, 0x44, 0x80, 0xc2, 0x11, 0xf2, 0xd3, 0x20, 0x5e, 0xa7, 0x1b, 0x4b, 0xa4, 0xee, 0xc7, 0x8e, 0xb7, 0x35, 0x75, 0x28, 0xe5, 0x6f, 0xcf, 0x4f, 0x74, 0x9f}
};
static void test_zrtpKDF(void) {
/* FIXME: Temporary workaround for -Wcast-function-type. */
#if __GNUC__ >= 8
_Pragma("GCC diagnostic push")
_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
#endif // if __GNUC__ >= 8
static void test_zrtpKDF(void) {
int i;
uint8_t keyKDF[32] = {0x33, 0xe6, 0x6c, 0x01, 0xca, 0x6f, 0xe6, 0x4f, 0xb7, 0x6f, 0xfd, 0xe3, 0x1c, 0xab, 0xc0, 0xfb, 0xad, 0x3d, 0x31, 0x02, 0x67, 0x6b, 0x0c, 0x09, 0x0f, 0xc9, 0x96, 0x38, 0x1e, 0x0a, 0x8c, 0x2f};
uint8_t output[32];
......@@ -89,9 +94,12 @@ static void test_zrtpKDF(void) {
BC_ASSERT_TRUE(memcmp(output, patternKDFOutput[i], patternKDFHmacLength[i]) == 0);
}
}
#if __GNUC__ >= 8
_Pragma("GCC diagnostic pop")
#endif // if __GNUC__ >= 8
#define CRC_TEST_NUMBER 3
uint16_t patternCRCLength[CRC_TEST_NUMBER] = {128, 24, 480};
......
......@@ -283,6 +283,11 @@ typedef struct my_Context_struct {
bzrtpChannelContext_t *peerChannelContext;
} my_Context_t;
/* FIXME: Temporary workaround for -Wcast-function-type. */
#if __GNUC__ >= 8
_Pragma("GCC diagnostic push")
_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
#endif // if __GNUC__ >= 8
static void test_parserComplete() {
......@@ -1555,6 +1560,9 @@ static void test_parserComplete() {
}
#if __GNUC__ >= 8
_Pragma("GCC diagnostic pop")
#endif // if __GNUC__ >= 8
typedef struct packetDatas_struct {
uint8_t packetString[1000];
......
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