Project

General

Profile

Bug #9030

sgs: duplicate 'const' declaration specifier

Added by Toomas Soome over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2018-02-05
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Issues revealed by gcc 7 build:

     ../common/elf.c: In function 'ehdr_mach_strings':
    ../common/elf.c:331:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_cf[] = {
                   ^~~~~
    ../common/elf.c:336:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_nf[] = {
                   ^~~~~
    ../common/elf.c:341:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_dmp[] = {
                   ^~~~~
    ../common/elf.c: In function 'ehdr_eident_strings':
    ../common/elf.c:429:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_cf[] = {
                   ^~~~~
    ../common/elf.c: In function 'ehdr_type_strings':
    ../common/elf.c:498:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_cf[] = {
                   ^~~~~
    ../common/elf.c: In function 'ehdr_vers_strings':
    ../common/elf.c:560:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_cf[] = {
                   ^~~~~
    ../common/elf.c: In function 'ehdr_osabi_strings':
    ../common/elf.c:808:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_cf[] = {
                   ^~~~~
    ../common/elf.c:811:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_nf[] = {
                   ^~~~~
    ../common/elf.c:814:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_dmp[] = {
                   ^~~~~
    ../common/elf.c: In function 'ehdr_abivers_strings':
    ../common/elf.c:882:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_cf[] = {
                   ^~~~~
    ../common/phdr.c: In function 'conv_phdr_type_strings':
    ../common/phdr.c:157:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_def[] = {
                   ^~~~~
    ./common/symbols.c: In function 'conv_sym_other_vis_strings':
    ../common/symbols.c:92:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_def[] = {
                   ^~~~~
    ../common/symbols.c:94:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_cf[] = {
                   ^~~~~
    ../common/symbols.c:96:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_nf[] = {
                   ^~~~~
    ../common/symbols.c: In function 'conv_sym_info_bind_strings':
    ../common/symbols.c:243:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_def[] = {
                   ^~~~~
    ../common/symbols.c:245:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_cf[] = {
                   ^~~~~
    ../common/symbols.c:247:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_nf[] = {
                   ^~~~~
    ../common/symbols.c: In function 'conv_sym_shndx_strings':
    ../common/symbols.c:344:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_def[] = {
                   ^~~~~
    ../common/symbols.c:346:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_cf[] = {
                   ^~~~~
    ../common/symbols.c:348:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_cfnp[] = {
                   ^~~~~
    ../common/symbols.c:350:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_nf[] = {
                   ^~~~~
    ../common/syminfo.c: In function 'conv_syminfo_boundto_strings':
    ../common/syminfo.c:170:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_cf[] = {
                   ^~~~~
    ../common/syminfo.c:172:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_cfnp[] = {
                   ^~~~~
    ../common/syminfo.c:174:15: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
      static const const conv_ds_t *ds_nf[] = {
                   ^~~~~
    ../common/syms.c:3112:7: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
     const const char *
           ^~~~~
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk over 1 year ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

git commit 84f7925403b3bca6fbe5475f7e5fe9e20852b686

commit  84f7925403b3bca6fbe5475f7e5fe9e20852b686
Author: Toomas Soome <tsoome@me.com>
Date:   2018-02-20T00:43:38.000Z

    9030 sgs: duplicate 'const' declaration specifier
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF