Skip to content

Please make the compiler work with gcc 10.x.x #398

@himu007

Description

@himu007

Currently the source compiles fine on gcc 8 or 9 in most Linux systems. But I'm getting -Werror error when I'm using gcc (Debian 10.2.1-6) 10.2.1 20210110 in my Debian.

Here is the error I'm getting.

src/asn/INTEGER.c: In function ‘asn_long2INTEGER’:
src/asn/INTEGER.c:927:34: error: array subscript 0 is outside array bounds of ‘long int[1]’ [-Werror=array-bounds]
  927 |  for(pstart = p, bp = buf, pend1 += add; p != pend1; p += add)
      |                            ~~~~~~^~~~~~
src/asn/INTEGER.c:883:38: note: while referencing ‘value’
  883 | asn_long2INTEGER(INTEGER_t *st, long value) {
      |                                 ~~~~~^~~~~
cc1: all warnings being treated as errors
make[3]: *** [Makefile:988: src/asn/INTEGER.lo] Error 1

I can bypass this by removing -Werror from zcutil/build.sh file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions