summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auth/milenage_test.c4
-rw-r--r--tests/conv/conv_test.c2
-rw-r--r--tests/sms/sms_test.c4
-rw-r--r--tests/smscb/smscb_test.c1
-rw-r--r--tests/timer/timer_test.c2
5 files changed, 8 insertions, 5 deletions
diff --git a/tests/auth/milenage_test.c b/tests/auth/milenage_test.c
index 7c996f02..0223764a 100644
--- a/tests/auth/milenage_test.c
+++ b/tests/auth/milenage_test.c
@@ -7,6 +7,8 @@
#include <osmocom/crypt/auth.h>
#include <osmocom/core/utils.h>
+int milenage_opc_gen(uint8_t *opc, const uint8_t *k, const uint8_t *op);
+
static void dump_auth_vec(struct osmo_auth_vector *vec)
{
printf("RAND:\t%s\n", osmo_hexdump(vec->rand, sizeof(vec->rand)));
@@ -88,7 +90,7 @@ int main(int argc, char **argv)
if (rc < 0) {
printf("AUTS failed\n");
} else {
- printf("AUTS success: SEQ.MS = %lu\n", test_aud.u.umts.sqn);
+ printf("AUTS success: SEQ.MS = %llu\n", (unsigned long long)test_aud.u.umts.sqn);
}
opc_test(&test_aud);
diff --git a/tests/conv/conv_test.c b/tests/conv/conv_test.c
index ab651d43..d9440f95 100644
--- a/tests/conv/conv_test.c
+++ b/tests/conv/conv_test.c
@@ -347,6 +347,8 @@ ubit_to_sbit(sbit_t *dst, ubit_t *src, int n)
dst[i] = src[i] ? -127 : 127;
}
+static void sbit_to_ubit(ubit_t *dst, sbit_t *src, int n) __attribute__((unused));
+
static void
sbit_to_ubit(ubit_t *dst, sbit_t *src, int n)
{
diff --git a/tests/sms/sms_test.c b/tests/sms/sms_test.c
index 8e10241a..2c9d8d8b 100644
--- a/tests/sms/sms_test.c
+++ b/tests/sms/sms_test.c
@@ -266,18 +266,15 @@ static void test_gen_oa(void)
int main(int argc, char** argv)
{
printf("SMS testing\n");
- struct msgb *msg;
uint8_t i;
uint16_t buffer_size;
uint8_t octet_length;
int octets_written;
uint8_t computed_octet_length;
uint8_t septet_length;
- uint8_t gsm_septet_length;
uint8_t coded[256];
uint8_t tmp[160];
uint8_t septet_data[256];
- uint8_t ud_header[6];
int nchars;
char result[256];
@@ -320,6 +317,7 @@ int main(int argc, char** argv)
/* Test: encode multiple SMS */
int number_of_septets = gsm_septet_encode(septet_data, (const char *) test_multiple_encode[0].input);
+ (void) number_of_septets;
/* SMS part 1 */
memset(tmp, 0x42, sizeof(tmp));
diff --git a/tests/smscb/smscb_test.c b/tests/smscb/smscb_test.c
index e10e12d8..5925f69b 100644
--- a/tests/smscb/smscb_test.c
+++ b/tests/smscb/smscb_test.c
@@ -21,6 +21,7 @@
#include <osmocom/gsm/protocol/gsm_03_41.h>
#include <stdio.h>
+#include <arpa/inet.h>
static uint8_t smscb_msg[] = { 0x40, 0x10, 0x05, 0x0d, 0x01, 0x11 };
diff --git a/tests/timer/timer_test.c b/tests/timer/timer_test.c
index bb9a177c..6184f667 100644
--- a/tests/timer/timer_test.c
+++ b/tests/timer/timer_test.c
@@ -115,7 +115,7 @@ static void secondary_timer_fired(void *data)
timersub(&current, &v->stop, &res);
if (timercmp(&res, &precision, >)) {
fprintf(stderr, "ERROR: timer %p has expired too late!\n",
- v->timer);
+ &v->timer);
too_late++;
}