diff mbox

Fix documentation and a ctor in gcov.c

Message ID f77b00e7-41f9-390f-0712-2ea5a1c3227f@suse.cz
State New
Headers show

Commit Message

Martin Liška May 2, 2017, 3:37 p.m. UTC
On 04/28/2017 07:23 PM, Nathan Sidwell wrote:
> Write proper member initializers please.

Hi.

Done that, patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
I consider the patch as pre-approved.

Martin

Comments

Nathan Sidwell May 3, 2017, 1:15 p.m. UTC | #1
On 05/02/2017 11:37 AM, Martin Liška wrote:
> On 04/28/2017 07:23 PM, Nathan Sidwell wrote:
>> Write proper member initializers please.
> 
> Hi.
> 
> Done that, patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
> I consider the patch as pre-approved.

yes, thanks!
diff mbox

Patch

From e694ed03b29882bbaaa02747acb188e16d459514 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Tue, 2 May 2017 13:38:57 +0200
Subject: [PATCH] Fix documentation and a ctor in gcov.c

gcc/ChangeLog:

2017-05-02  Martin Liska  <mliska@suse.cz>

	* doc/gcov.texi: Add missing preposition.
	* gcov.c (function_info::function_info): Properly fill up
	all member variables.
---
 gcc/doc/gcov.texi | 2 +-
 gcc/gcov.c        | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi
index c96f86df830..706aa6cf0b0 100644
--- a/gcc/doc/gcov.texi
+++ b/gcc/doc/gcov.texi
@@ -325,7 +325,7 @@  containing no code.  Unexecuted lines are marked @samp{#####} or
 @samp{====}, depending on whether they are reachable by
 non-exceptional paths or only exceptional paths such as C++ exception
 handlers, respectively. Given @samp{-a} option, unexecuted blocks are
-marked @samp{$$$$$} or @samp{%%%%%}, depending whether a basic block
+marked @samp{$$$$$} or @samp{%%%%%}, depending on whether a basic block
 is reachable via non-exceptional or exceptional paths.
 
 Some lines of information at the start have @var{line_number} of zero.
diff --git a/gcc/gcov.c b/gcc/gcov.c
index 4e6771e79d0..a5aa4aadcac 100644
--- a/gcc/gcov.c
+++ b/gcc/gcov.c
@@ -435,10 +435,11 @@  static char *mangle_name (const char *, char *);
 static void release_structures (void);
 extern int main (int, char **);
 
-function_info::function_info ()
+function_info::function_info (): name (NULL), demangled_name (NULL),
+  ident (0), lineno_checksum (0), cfg_checksum (0), has_catch (0),
+  blocks (), blocks_executed (0), counts (NULL), num_counts (0),
+  line (0), src (0), next_file_fn (NULL), next (NULL)
 {
-  /* The type is POD, so that we can use memset.  */
-  memset (this, 0, sizeof (*this));
 }
 
 function_info::~function_info ()
-- 
2.12.2