Project

General

Profile

Actions

Bug #14386

open

libc: build errors with gcc 11

Added by Toomas Soome 9 days ago. Updated 9 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Different errors in libc:

    ../port/sys/utimesys.c:97:47: error: argument 2 of type 'const struct timeval[2]' with mismatched bound [-Werror=array-parameter=]
       97 | utimes(const char *path, const struct timeval times[2])
          |                          ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:662,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/utime.h:33,
                     from /code/illumos-gate/proto/root_i386/usr/include/utime.h:34,
                     from ../port/sys/utimesys.c:33:
    /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:403:26: note: previously declared as 'const struct timeval *'
      403 | int utimes(const char *, const struct timeval *);
          |                          ^~~~~~~~~~~~~~~~~~~~~~
    ../port/sys/utimesys.c:103:48: error: argument 2 of type 'const struct timeval[2]' with mismatched bound [-Werror=array-parameter=]
      103 | lutimes(const char *path, const struct timeval times[2])
          |                           ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:662,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/utime.h:33,
                     from /code/illumos-gate/proto/root_i386/usr/include/utime.h:34,
                     from ../port/sys/utimesys.c:33:
    /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:417:27: note: previously declared as 'const struct timeval *'
      417 | int lutimes(const char *, const struct timeval *);
          |                           ^~~~~~~~~~~~~~~~~~~~~~
    ../port/sys/utimesys.c:110:58: error: argument 3 of type 'const struct timeval[2]' with mismatched bound [-Werror=array-parameter=]
      110 | futimesat(int fd, const char *path, const struct timeval times[2])
          |                                     ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:662,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/utime.h:33,
                     from /code/illumos-gate/proto/root_i386/usr/include/utime.h:34,
                     from ../port/sys/utimesys.c:33:
    /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:396:34: note: previously declared as 'const struct timeval *'
      396 | int futimesat(int, const char *, const struct timeval *);
          |                                  ^~~~~~~~~~~~~~~~~~~~~~
    ../port/sys/utimesys.c:136:38: error: argument 2 of type 'const struct timeval[2]' with mismatched bound [-Werror=array-parameter=]
      136 | futimes(int fd, const struct timeval times[2])
          |                 ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:662,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/utime.h:33,
                     from /code/illumos-gate/proto/root_i386/usr/include/utime.h:34,
                     from ../port/sys/utimesys.c:33:
    /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:416:18: note: previously declared as 'const struct timeval *'
      416 | int futimes(int, const struct timeval *);
          |                  ^~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

    ../port/print/doprnt.c: In function '_ndoprnt':
    ../port/print/doprnt.c:169:21: error: this 'for' clause does not guard... [-Werror=misleading-indentation]
      169 |                     for (nn = n; nn > PAD_LEN; nn -= PAD_LEN) \
          |                     ^~~
    ../port/print/doprnt.c:2154:41: note: in expansion of macro 'PAD'
     2154 |                                         PAD(_blanks, width - k);
          |                                         ^~~
    ../port/print/doprnt.c:123:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
      123 |         {\
          |         ^~
      124 |                 /*\
          |
    ../port/print/doprnt.c:123:9: note: in definition of macro 'PUT'
      123 |         {\
          |         ^~
      124 |                 /*\
          |
    ../port/print/doprnt.c:2154:41: note: in expansion of macro 'PAD'
     2154 |                                         PAD(_blanks, width - k);
          |                                         ^~~
    ../port/print/doprnt.c:169:21: error: this 'for' clause does not guard... [-Werror=misleading-indentation]
      169 |                     for (nn = n; nn > PAD_LEN; nn -= PAD_LEN) \
          |                     ^~~
    ../port/print/doprnt.c:2164:25: note: in expansion of macro 'PAD'
     2164 |                         PAD(_zeroes, lzero);
          |                         ^~~
    ../port/print/doprnt.c:123:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
      123 |         {\
          |         ^~
      124 |                 /*\
          |
    ../port/print/doprnt.c:123:9: note: in definition of macro 'PUT'
      123 |         {\
          |         ^~
      124 |                 /*\
          |
    ../port/print/doprnt.c:2164:25: note: in expansion of macro 'PAD'
     2164 |                         PAD(_zeroes, lzero);
          |                         ^~~
    ../port/print/doprnt.c:169:21: error: this 'for' clause does not guard... [-Werror=misleading-indentation]
      169 |                     for (nn = n; nn > PAD_LEN; nn -= PAD_LEN) \
          |                     ^~~
    ../port/print/doprnt.c:2200:33: note: in expansion of macro 'PAD'
     2200 |                                 PAD(_zeroes, rzero);
          |                                 ^~~
    ../port/print/doprnt.c:123:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
      123 |         {\
          |         ^~
      124 |                 /*\
          |
    ../port/print/doprnt.c:123:9: note: in definition of macro 'PUT'
      123 |         {\
          |         ^~
      124 |                 /*\
          |
    ../port/print/doprnt.c:2200:33: note: in expansion of macro 'PAD'
     2200 |                                 PAD(_zeroes, rzero);
          |                                 ^~~
    ../port/print/doprnt.c:169:21: error: this 'for' clause does not guard... [-Werror=misleading-indentation]
      169 |                     for (nn = n; nn > PAD_LEN; nn -= PAD_LEN) \
          |                     ^~~
    ../port/print/doprnt.c:2208:33: note: in expansion of macro 'PAD'
     2208 |                                 PAD(_blanks, width - k);
          |                                 ^~~
    ../port/print/doprnt.c:123:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
      123 |         {\
          |         ^~
      124 |                 /*\
          |
    ../port/print/doprnt.c:123:9: note: in definition of macro 'PUT'
      123 |         {\
          |         ^~
      124 |                 /*\
          |
    ../port/print/doprnt.c:2208:33: note: in expansion of macro 'PAD'
     2208 |                                 PAD(_blanks, width - k);
          |                                 ^~~
    cc1: all warnings being treated as errors

    ../port/gen/ndbm.c:844:15: error: argument 1 of type 'char[1024]' with mismatched bound [-Werror=array-parameter=]
      844 | makdatum(char buf[PBLKSIZ], int n)
          |          ~~~~~^~~~~~~~~~~~
    ../port/gen/ndbm.c:72:23: note: previously declared as 'char *'
       72 | static datum makdatum(char *, int);
          |                       ^~~~~~
    ../port/gen/ndbm.c:889:16: error: argument 1 of type 'char[1024]' with mismatched bound [-Werror=array-parameter=]
      889 | finddatum(char buf[PBLKSIZ], datum item)
          |           ~~~~~^~~~~~~~~~~~
    ../port/gen/ndbm.c:75:22: note: previously declared as 'char *'
       75 | static int finddatum(char *, datum);
          |                      ^~~~~~
    ../port/gen/ndbm.c:965:14: error: argument 1 of type 'char[1024]' with mismatched bound [-Werror=array-parameter=]
      965 | delitem(char buf[PBLKSIZ], int n)
          |         ~~~~~^~~~~~~~~~~~
    ../port/gen/ndbm.c:76:20: note: previously declared as 'char *'
       76 | static int delitem(char *, int);
          |                    ^~~~~~
    ../port/gen/ndbm.c:996:14: error: argument 1 of type 'char[1024]' with mismatched bound [-Werror=array-parameter=]
      996 | additem(char buf[PBLKSIZ], datum item, datum item1)
          |         ~~~~~^~~~~~~~~~~~
    ../port/gen/ndbm.c:77:20: note: previously declared as 'char *'
       77 | static int additem(char *, datum, datum);
          |                    ^~~~~~
    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk 9 days ago

  • Gerrit CR set to 1933
Actions

Also available in: Atom PDF