Fix small coding style issues (PR fortran/87394).
authorMartin Liska <mliska@suse.cz>
Tue, 25 Sep 2018 07:13:59 +0000 (09:13 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 25 Sep 2018 07:13:59 +0000 (07:13 +0000)
2018-09-25  Martin Liska  <mliska@suse.cz>

PR fortran/87394
* dbgcnt.c (dbg_cnt_process_single_pair): Return false
instead of NULL.
* dumpfile.c (dump_enable_all): Remove extra parenthesis.
* gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
* godump.c (go_format_type): Remove extra parenthesis.
2018-09-25  Martin Liska  <mliska@suse.cz>

PR fortran/87394
* decl.c (add_hidden_procptr_result): Simplify condition
as we are in branch witch 'case1 || case2'.

From-SVN: r264562

gcc/ChangeLog
gcc/dbgcnt.c
gcc/dumpfile.c
gcc/fortran/ChangeLog
gcc/fortran/decl.c
gcc/gcov-tool.c
gcc/godump.c

index f5dcd16..e5891f6 100644 (file)
@@ -1,5 +1,14 @@
 2018-09-25  Martin Liska  <mliska@suse.cz>
 
+       PR fortran/87394
+       * dbgcnt.c (dbg_cnt_process_single_pair): Return false
+       instead of NULL.
+       * dumpfile.c (dump_enable_all): Remove extra parenthesis.
+       * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
+       * godump.c (go_format_type): Remove extra parenthesis.
+
+2018-09-25  Martin Liska  <mliska@suse.cz>
+
        * alias.c (set_dest_equal_p): Remove unused function.
        * config/i386/i386.c (def_builtin_pure2): Likewise.
        * diagnostic-show-locus.c (class layout): Remove
index ddb0e8e..1eea658 100644 (file)
@@ -138,7 +138,7 @@ dbg_cnt_process_single_pair (const char *arg)
   int high, low;
 
   if (value1 == NULL)
-    return NULL;
+    return false;
 
   if (value2 == NULL)
     {
index 5655e46..b4faeaa 100644 (file)
@@ -1511,7 +1511,7 @@ dump_enable_all (dump_kind dkind, dump_flags_t flags, const char *filename)
 
   for (i = TDI_none + 1; i < (size_t) TDI_end; i++)
     {
-      if ((dump_files[i].dkind == dkind))
+      if (dump_files[i].dkind == dkind)
         {
           const char *old_filename = dump_files[i].pfilename;
           dump_files[i].pstate = -1;
@@ -1532,7 +1532,7 @@ dump_enable_all (dump_kind dkind, dump_flags_t flags, const char *filename)
 
   for (i = 0; i < m_extra_dump_files_in_use; i++)
     {
-      if ((m_extra_dump_files[i].dkind == dkind))
+      if (m_extra_dump_files[i].dkind == dkind)
         {
           const char *old_filename = m_extra_dump_files[i].pfilename;
           m_extra_dump_files[i].pstate = -1;
index 7e1546f..86d0a3e 100644 (file)
@@ -1,5 +1,11 @@
 2018-09-25  Martin Liska  <mliska@suse.cz>
 
+       PR fortran/87394
+       * decl.c (add_hidden_procptr_result): Simplify condition
+       as we are in branch witch 'case1 || case2'.
+
+2018-09-25  Martin Liska  <mliska@suse.cz>
+
        * trans.c (remove_suffix): Remove
        unused function.
 
index 91a1f34..7f79811 100644 (file)
@@ -6463,7 +6463,7 @@ add_hidden_procptr_result (gfc_symbol *sym)
       gfc_symtree *stree;
       if (case1)
        gfc_get_sym_tree ("ppr@", gfc_current_ns, &stree, false);
-      else if (case2)
+      else
        {
          gfc_symtree *st2;
          gfc_get_sym_tree ("ppr@", gfc_current_ns->parent, &stree, false);
index 88539f9..173ed5e 100644 (file)
@@ -438,7 +438,7 @@ static const struct option overlap_options[] =
 
 /* Print overlap usage and exit.  */
 
-static void
+static void ATTRIBUTE_NORETURN
 overlap_usage (void)
 {
   fnotice (stderr, "Overlap subcomand usage:");
index 88e1a77..baf21e2 100644 (file)
@@ -961,7 +961,7 @@ go_format_type (struct godump_container *container, tree type,
                   unions.  */
                if (!is_anon_substructure)
                  {
-                   if ((DECL_NAME (field) == NULL))
+                   if (DECL_NAME (field) == NULL)
                      *p_art_i = go_append_artificial_name (ob, *p_art_i);
                    else
                      go_append_decl_name