From: Tom Rini Date: Fri, 12 May 2017 13:23:58 -0400 Subject: [U-Boot] [U-Boot, 4/8] cmd/led.c: Remove unnecessary check on 'cmd' value In-Reply-To: <1494444018-2748-4-git-send-email-trini@konsulko.com> References: <1494444018-2748-4-git-send-email-trini@konsulko.com> Message-ID: <20170512172358.GC5701@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, May 10, 2017 at 03:20:14PM -0400, Tom Rini wrote: > We first check that if argc is less than 2 we return CMD_RET_USAGE. We > then see if argc is greater than 2 and if so call get_led_cmd() to set > 'cmd' and otherwise set it to LEDST_COUNT (which will always be positive > as it's an enum with 0 already assigned). Therefore the test on if cmd > is less than 0 will always be false and simply be omitted. Reported by > clang-3.8. > > Signed-off-by: Tom Rini Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: