aboutsummaryrefslogtreecommitdiffstats
path: root/src/bnetz
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2016-10-07 08:55:18 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2016-10-07 08:55:18 +0200
commit27938d111e2f49ed3e8c39647d9a8fbc1482a686 (patch)
tree073f0cf2ebab7d7eb68a414fc553f0723da72b86 /src/bnetz
parent8ef966aa21f58c867a9dd8b60108e489c1dc2f8f (diff)
Added and fixed extra compiler warnings
Diffstat (limited to 'src/bnetz')
-rw-r--r--src/bnetz/Makefile.am2
-rw-r--r--src/bnetz/bnetz.c10
-rw-r--r--src/bnetz/image.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/bnetz/Makefile.am b/src/bnetz/Makefile.am
index a150a2b..f0516bb 100644
--- a/src/bnetz/Makefile.am
+++ b/src/bnetz/Makefile.am
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wall -g $(all_includes)
+AM_CPPFLAGS = -Wall -Wextra -g $(all_includes)
bin_PROGRAMS = \
bnetz
diff --git a/src/bnetz/bnetz.c b/src/bnetz/bnetz.c
index 06b5509..cf8dc15 100644
--- a/src/bnetz/bnetz.c
+++ b/src/bnetz/bnetz.c
@@ -231,7 +231,7 @@ int bnetz_init(void)
for (i = 0; impulstelegramme[i].digit; i++) {
uint16_t telegramm = 0;
- for (j = 0; j < strlen(impulstelegramme[i].sequence); j++) {
+ for (j = 0; j < (int)strlen(impulstelegramme[i].sequence); j++) {
telegramm <<= 1;
telegramm |= (impulstelegramme[i].sequence[j] == '1');
}
@@ -667,7 +667,7 @@ void bnetz_receive_telegramm(bnetz_t *bnetz, uint16_t telegramm, double level, d
char dialing[sizeof(bnetz->dial_number) + 1] = "0";
strcpy(dialing + 1, bnetz->dial_number);
- if (bnetz->dial_pos != strlen(bnetz->dial_number)) {
+ if (bnetz->dial_pos != (int)strlen(bnetz->dial_number)) {
PDEBUG(DBNETZ, DEBUG_NOTICE, "Received too few number digits the second time, aborting.\n");
bnetz_go_idle(bnetz);
return;
@@ -693,7 +693,7 @@ void bnetz_receive_telegramm(bnetz_t *bnetz, uint16_t telegramm, double level, d
bnetz_go_idle(bnetz);
return;
}
- if (bnetz->dial_pos == strlen(bnetz->dial_number)) {
+ if (bnetz->dial_pos == (int)strlen(bnetz->dial_number)) {
PDEBUG(DBNETZ, DEBUG_NOTICE, "Received too many number digits, aborting.\n");
bnetz_go_idle(bnetz);
return;
@@ -770,7 +770,7 @@ static void bnetz_timeout(struct timer *timer)
}
/* Call control starts call towards mobile station. */
-int call_out_setup(int callref, const char *caller_id, enum number_type caller_type, const char *dialing)
+int call_out_setup(int callref, const char __attribute__((unused)) *caller_id, enum number_type __attribute__((unused)) caller_type, const char *dialing)
{
sender_t *sender;
bnetz_t *bnetz;
@@ -866,7 +866,7 @@ void call_out_disconnect(int callref, int cause)
}
/* Call control releases call toward mobile station. */
-void call_out_release(int callref, int cause)
+void call_out_release(int callref, int __attribute__((unused)) cause)
{
sender_t *sender;
bnetz_t *bnetz;
diff --git a/src/bnetz/image.c b/src/bnetz/image.c
index e999e44..5cd53a9 100644
--- a/src/bnetz/image.c
+++ b/src/bnetz/image.c
@@ -41,7 +41,7 @@ void print_image(void)
int i, j;
for (i = 0; image[i]; i++) {
- for (j = 0; j < strlen(image[i]); j++) {
+ for (j = 0; j < (int)strlen(image[i]); j++) {
if (image[i][j] == '@') {
j++;
switch(image[i][j]) {