From mboxrd@z Thu Jan 1 00:00:00 1970 From: York Sun Date: Thu, 13 Nov 2014 14:51:55 -0800 Subject: [U-Boot] [PATCH v2] tools/kwbimage: Fix compilation warning In-Reply-To: <20141028103825.C0A02382FFB@gemini.denx.de> References: <1414492344-19055-1-git-send-email-sr@denx.de> <20141028103825.C0A02382FFB@gemini.denx.de> Message-ID: <5465360B.50109@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/28/2014 03:38 AM, Wolfgang Denk wrote: > Dear Stefan Roese, > > In message <1414492344-19055-1-git-send-email-sr@denx.de> you wrote: >> This patch fixes a compilation warning of kwbimage.c: >> >> tools/kwbimage.c: In function ?kwbimage_set_header?: >> tools/kwbimage.c:784:8: warning: ?headersz? may be used uninitialized in this function [-Wmaybe-uninitialized] >> memcpy(ptr, image, headersz); >> ^ >> Instead of using multiple if statements, use a switch statement with >> a default entry. And return with error if an unsupported version >> is configured in the cfg file. >> >> Signed-off-by: Stefan Roese >> --- >> v2: >> - Change error message so that it really makes sense (unsupported >> version instead of no version) >> - Change this also in the commit text >> - Small change (s/is/if) > > Acked-By: Wolfgang Denk > I failed to see how the warning message got fixed. I still see this warning when compiling. York