From c46bd3cedb90dfc4c056ffa965cc3dbb2c358bd2 Mon Sep 17 00:00:00 2001 From: erin_yueh Date: Thu, 21 Feb 2008 11:00:23 +0000 Subject: gsmd: fix gcc warning (Erin Yueh) git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@4098 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/gsmd/atcmd.c | 2 +- src/gsmd/ext_response.c | 3 ++- src/gsmd/gsmd.c | 4 ++-- src/gsmd/machine_telit.c | 1 + src/gsmd/usock.c | 7 +++---- src/gsmd/vendor_telit.c | 1 - 6 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/gsmd') diff --git a/src/gsmd/atcmd.c b/src/gsmd/atcmd.c index cee16f9..adf18e0 100644 --- a/src/gsmd/atcmd.c +++ b/src/gsmd/atcmd.c @@ -270,7 +270,7 @@ static int ml_parse(const char *buf, int len, void *ctx) !strcmp(buf, "AT-Command Interpreter ready")) { g->interpreter_ready = 1; gsmd_initsettings(g); - gmsd_alive_start(g); + gsmd_alive_start(g); return 0; } diff --git a/src/gsmd/ext_response.c b/src/gsmd/ext_response.c index 0736b6e..94fe2b9 100644 --- a/src/gsmd/ext_response.c +++ b/src/gsmd/ext_response.c @@ -202,13 +202,14 @@ void extrsp_dump(const struct gsm_extrsp *er) case GSMD_ECMD_RTT_STRING: DEBUGP("%s\n", tok->u.string); break; + case GSMD_ECMD_RTT_NONE: + break; case GSMD_ECMD_RTT_RANGE: { int j; for (j = 0; j < tok->u.range.num_items; j++) DEBUGP("%d-%d, ", tok->u.range.item[j].min, tok->u.range.item[j].max); } - break; } } diff --git a/src/gsmd/gsmd.c b/src/gsmd/gsmd.c index af6c4a3..2373a06 100644 --- a/src/gsmd/gsmd.c +++ b/src/gsmd/gsmd.c @@ -125,7 +125,7 @@ static void alive_interval_tmr_cb(struct gsmd_timer *tmr, void *data) gsmd_timer_register(tmr); } -int gmsd_alive_start(struct gsmd *gsmd) +int gsmd_alive_start(struct gsmd *gsmd) { struct timeval tv; @@ -496,7 +496,7 @@ int main(int argc, char **argv) if (g.interpreter_ready) { gsmd_initsettings(&g); - gmsd_alive_start(&g); + gsmd_alive_start(&g); } gsmd_opname_init(&g); diff --git a/src/gsmd/machine_telit.c b/src/gsmd/machine_telit.c index 0a628cf..ec971ea 100644 --- a/src/gsmd/machine_telit.c +++ b/src/gsmd/machine_telit.c @@ -33,6 +33,7 @@ #include #include #include +#include #define GSMD_MODEM_POWEROFF_TIMEOUT 6 diff --git a/src/gsmd/usock.c b/src/gsmd/usock.c index 390f4bf..3d2d751 100644 --- a/src/gsmd/usock.c +++ b/src/gsmd/usock.c @@ -876,7 +876,6 @@ static int network_oper_cb(struct gsmd_atcmd *cmd, void *ctx, char *resp) static int network_oper_n_cb(struct gsmd_atcmd *cmd, void *ctx, char *resp) { struct gsmd_user *gu = ctx; - int format, s, ret; char buf[16+1] = {'\0'}; struct gsm_extrsp *er; @@ -923,7 +922,7 @@ static int network_opers_parse(const char *str, struct gsmd_msg_oper **out) if (strncmp(str, "+COPS: ", 7)) return -EINVAL; - ptr = str; + ptr = (char *) str; while (*str) { if ( *str == '(' && isdigit(*(str+1)) ) { len++; @@ -943,9 +942,9 @@ static int network_opers_parse(const char *str, struct gsmd_msg_oper **out) while (*str) { if ( *str == '(' ) - head = str; + head = (char *) str; else if ( *str == ')' ) { - tail = str; + tail = (char *) str; memset(buf, '\0', sizeof(buf)); strncpy(buf, head+1, (tail-head-1)); diff --git a/src/gsmd/vendor_telit.c b/src/gsmd/vendor_telit.c index ab42264..2731742 100644 --- a/src/gsmd/vendor_telit.c +++ b/src/gsmd/vendor_telit.c @@ -59,7 +59,6 @@ static int telit_detect(struct gsmd *g) static int telit_initsettings(struct gsmd *g) { int rc = 0; - struct gsmd_atcmd *cmd; /* Get network registration events with full information. */ rc |= gsmd_simplecmd(g, "AT+CGREG=2"); -- cgit v1.2.3