From: Szymon Janc <szymon.janc@xxxxxxxxx> Value stored to err_msg is never read in case err was not NULL. Simply remove err_msg and pass strerror() directly where it is used. --- profiles/network/connection.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/profiles/network/connection.c b/profiles/network/connection.c index abcbee8..1a1fb4d 100644 --- a/profiles/network/connection.c +++ b/profiles/network/connection.c @@ -371,19 +371,16 @@ static int bnep_connect(struct network_conn *nc) static void connect_cb(GIOChannel *chan, GError *err, gpointer data) { struct network_conn *nc = data; - const char *err_msg; int perr; if (err) { error("%s", err->message); - err_msg = err->message; goto failed; } perr = bnep_connect(nc); if (perr < 0) { - err_msg = strerror(-perr); - error("bnep connect(): %s (%d)", err_msg, -perr); + error("bnep connect(): %s (%d)", strerror(-perr), -perr); goto failed; } -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html