From: Alexis Green Date: Mon, 1 Aug 2016 20:03:46 +0000 (-0700) Subject: Fixing warning: X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/6e321dd8f3af554fd5f670be4c2e96e993e69ad1?hp=981aefe33dc0fe53eb03828e559eb6d37c6a9573 Fixing warning: warning: ignoring return va 'scanf', declared with attribute warn_unused_result [-Wunused-result] --- diff --git a/client/cmdhflegic.c b/client/cmdhflegic.c index ccdfa1da..0adf3c59 100644 --- a/client/cmdhflegic.c +++ b/client/cmdhflegic.c @@ -527,8 +527,7 @@ int CmdLegicRfRawWrite(const char *Cmd) { PrintAndLog("# changing the DCF is irreversible #"); PrintAndLog("#####################################"); PrintAndLog("do youe really want to continue? y(es) n(o)"); - scanf(" %c", &answer); - if (answer == 'y' || answer == 'Y') { + if (scanf(" %c", &answer) > 0 && (answer == 'y' || answer == 'Y')) { SendCommand(&c); return 0; }