summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorSteve Linsell <stevenx.linsell@intel.com>2018-02-22 13:24:13 -0500
committerRich Salz <rsalz@openssl.org>2018-02-22 13:54:27 -0500
commitd16a2c1931534cfc798a15c255e17180844d2ceb (patch)
tree3bce3c30fb9c4dda4fc7e402ed08b2dad9dcb4f6 /apps
parent6f4b929af0b7dfb6a4d420fc9a8e25016f616c10 (diff)
initialise dc variable to satisfy old compilers.
When compiling with -Wall on a machine with an old compiler it gives a false positive that the dc variable which is a structure of type DISPLAY_COLUMNS could be used uninitialised. In fact the dc variable's members will always get set in the case it is used, otherwise it is left uninitialised. This fix just causes the dc variable's members to always get initialised to 0 at declaration, so the false positive will not get flagged. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5337)
Diffstat (limited to 'apps')
-rw-r--r--apps/openssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/openssl.c b/apps/openssl.c
index fffa05e1c7..39b4f2ce54 100644
--- a/apps/openssl.c
+++ b/apps/openssl.c
@@ -520,7 +520,7 @@ static void list_type(FUNC_TYPE ft, int one)
{
FUNCTION *fp;
int i = 0;
- DISPLAY_COLUMNS dc;
+ DISPLAY_COLUMNS dc = {0};
if (!one)
calculate_columns(&dc);