StdLib: Fix a "potentially uninitialized variable" error.
gdtoa/gdtoa.c: Several "goto" paths allowed the initialization of a variable to be bypassed. Initialized it at the top of the function in order to eliminate the error. Updated the file header and copyright notices. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daryl McDaniel <daryl.mcdaniel@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16324 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
931b2cff42
commit
2a7e98a8cc
@ -1,6 +1,15 @@
|
|||||||
/* $NetBSD: gdtoa.c,v 1.1.1.1.4.1.4.1 2008/04/08 21:10:55 jdc Exp $ */
|
/** @file
|
||||||
|
|
||||||
/****************************************************************
|
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
|
This program and the accompanying materials are licensed and made available under
|
||||||
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
|
The full text of the license may be found at
|
||||||
|
http://opensource.org/licenses/bsd-license.php.
|
||||||
|
|
||||||
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||||
|
|
||||||
|
***************************************************************
|
||||||
|
|
||||||
The author of this software is David M. Gay.
|
The author of this software is David M. Gay.
|
||||||
|
|
||||||
@ -26,10 +35,11 @@ IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|||||||
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
||||||
THIS SOFTWARE.
|
THIS SOFTWARE.
|
||||||
|
|
||||||
****************************************************************/
|
Please send bug reports to David M. Gay (dmg at acm dot org,
|
||||||
|
with " at " changed at "@" and " dot " changed to ".").
|
||||||
|
|
||||||
/* Please send bug reports to David M. Gay (dmg at acm dot org,
|
NetBSD: gdtoa.c,v 1.1.1.1.4.1.4.1 2008/04/08 21:10:55 jdc Exp
|
||||||
* with " at " changed at "@" and " dot " changed to "."). */
|
**/
|
||||||
#include <LibConfig.h>
|
#include <LibConfig.h>
|
||||||
|
|
||||||
#include "gdtoaimp.h"
|
#include "gdtoaimp.h"
|
||||||
@ -162,6 +172,8 @@ gdtoa
|
|||||||
double d, d2, ds, eps;
|
double d, d2, ds, eps;
|
||||||
char *s, *s0;
|
char *s, *s0;
|
||||||
|
|
||||||
|
mlo = NULL;
|
||||||
|
|
||||||
#ifndef MULTIPLE_THREADS
|
#ifndef MULTIPLE_THREADS
|
||||||
if (dtoa_result) {
|
if (dtoa_result) {
|
||||||
freedtoa(dtoa_result);
|
freedtoa(dtoa_result);
|
||||||
@ -497,7 +509,8 @@ gdtoa
|
|||||||
|
|
||||||
m2 = b2;
|
m2 = b2;
|
||||||
m5 = b5;
|
m5 = b5;
|
||||||
mhi = mlo = 0;
|
mhi = NULL;
|
||||||
|
mlo = NULL;
|
||||||
if (leftright) {
|
if (leftright) {
|
||||||
if (mode < 2) {
|
if (mode < 2) {
|
||||||
i = nbits - bbits;
|
i = nbits - bbits;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user