From 2f5658737b300705d9a5e6126d0a77568884632e Mon Sep 17 00:00:00 2001 From: koron393 Date: Sat, 5 Oct 2024 19:26:21 +0900 Subject: [PATCH 1/2] Suppress unused-function warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: ‘fill_random_bytes’ defined but not used [-Wunused-function] Change-Id: I92fcf68132ade35d0558f4c4024e1c91cf6bbf8f --- aribb25/arib_std_b25.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/aribb25/arib_std_b25.c b/aribb25/arib_std_b25.c index c682ab5..3a9021e 100644 --- a/aribb25/arib_std_b25.c +++ b/aribb25/arib_std_b25.c @@ -444,8 +444,9 @@ static void extract_emm_fixed_part(EMM_FIXED_PART *dst, uint8_t *src); static uint8_t *resync(uint8_t *head, uint8_t *tail, int32_t unit); static uint8_t *resync_force(uint8_t *head, uint8_t *tail, int32_t unit); +#ifdef USE_BENCHMARK static void fill_random_bytes(uint8_t *data, size_t size); - +#endif /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ interface method implementation ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ @@ -3026,6 +3027,10 @@ static uint8_t *resync_force(uint8_t *head, uint8_t *tail, int32_t unit_size) return NULL; } +#ifdef USE_BENCHMARK +/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + test function implementation + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ void fill_random_bytes(uint8_t *data, size_t size) { uint8_t mask = 0xFF; @@ -3036,10 +3041,6 @@ void fill_random_bytes(uint8_t *data, size_t size) } } -/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - test function implementation - ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ -#ifdef USE_BENCHMARK #define PACKETS_PER_SEC 10000 int test_multi2_decryption(void *std_b25, int64_t *time, int32_t instruction, int32_t round) { From 72f9279bf5e25f6f0d2cad7092097c0ed0dfa97b Mon Sep 17 00:00:00 2001 From: koron393 Date: Sat, 5 Oct 2024 19:33:14 +0900 Subject: [PATCH 2/2] Suppress return-type warning warning: control reaches end of non-void function [-Wreturn-type] Change-Id: If739be176fa4c3b7e52872b2a30033621ebf52ed --- aribb25/arib_std_b25.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aribb25/arib_std_b25.c b/aribb25/arib_std_b25.c index 3a9021e..4d40c80 100644 --- a/aribb25/arib_std_b25.c +++ b/aribb25/arib_std_b25.c @@ -2146,6 +2146,8 @@ static int proc_ecm(DECRYPTOR_ELEM *dec, B_CAS_CARD *bcas, int32_t multi2_round) r = ARIB_STD_B25_ERROR_ECM_PARSE_FAILURE; } } + + return r; } #if defined(DEBUG)