diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2012-07-07 16:59:26 -0500 |
---|---|---|
committer | Jason Wessel <jason.wessel@windriver.com> | 2012-07-07 17:01:48 -0500 |
commit | 6773fa9d6276312d1190c46d00e4504fbfec6d8c (patch) | |
tree | af283455b8335e7c89147f53ebaa296c193324f3 | |
parent | 41cb7ac2ba15ebd748bd71e6a3c021afe04a3956 (diff) | |
download | agent-proxy-6773fa9d6276312d1190c46d00e4504fbfec6d8c.tar.gz |
agent-proxy: Squelch compile warnings
agent-proxy.c: In function ‘writeScriptClients’:
agent-proxy.c:806:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
agent-proxy.c: In function ‘main’:
agent-proxy.c:1460:6: warning: variable ‘latency’ set but not used [-Wunused-but-set-variable]
agent-proxy.c:1459:6: warning: variable ‘baud’ set but not used [-Wunused-but-set-variable]
The ret warning just needs to have the variable deleted. For the latency
and baud, they are for a seldom used feature that is #if def'ed and
these variables should be behind the #if USE_LATENCY option.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
-rw-r--r-- | agent-proxy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/agent-proxy.c b/agent-proxy.c index 7cc5c1d..a2d7706 100644 --- a/agent-proxy.c +++ b/agent-proxy.c @@ -803,7 +803,6 @@ static int writeScriptClients(struct port_st *s_port, char *buf, int bytes, { struct port_st *iport = s_port->clients; int got; - int ret = 0; int i; if (s_port->breakPort && gdbSplit) { @@ -848,7 +847,6 @@ static int writeScriptClients(struct port_st *s_port, char *buf, int bytes, printf ("ERROR on write of client port %i got %i\n", iport->sock, got); - ret = 1; killScriptClient(s_port, &iport, 1); continue; } @@ -1456,8 +1454,10 @@ int main(int argc, char *argv[]) FILE *pidf; int pid; int ind; +#ifdef USE_LATENCY int baud; int latency; +#endif /* USE_LATENCY */ int got; int select_ret; char *s; @@ -1560,14 +1560,14 @@ int main(int argc, char *argv[]) breakStrLen = 1; breakStr[0] = (unsigned char)atoi(s); break; +#ifdef USE_LATENCY case 'b': baud = atoi(s); break; - case 'l': latency = atoi(s); break; - +#endif /* USE_LATENCY */ default: fprintf(stderr, "%s: option -%c not recognized\n", |