<div dir="ltr"><div dir="ltr"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 27, 2022 at 9:09 AM <<a href="mailto:asterisk@phreaknet.org">asterisk@phreaknet.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 9/26/2022 8:25 PM, Jerry Geis wrote:<br>
> On Mon, Sep 26, 2022 at 8:09 PM <<a href="mailto:asterisk@phreaknet.org" target="_blank">asterisk@phreaknet.org</a> <br>
> <mailto:<a href="mailto:asterisk@phreaknet.org" target="_blank">asterisk@phreaknet.org</a>>> wrote:<br>
><br>
>     On 9/26/2022 8:00 PM, Jerry Geis wrote:<br>
>     > I am getting a compile error:<br>
>     ><br>
>     > gcc -g  -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes<br>
>     > -Werror=zero-length-bounds -fPIC  -O2  -MD -MT q921.o -MF<br>
>     .q921.o.d -MP -c<br>
>     > -o q921.o q921.c<br>
>     > q921.c: In function ‘q921_dump’:<br>
>     > q921.c:1333:85: error: array subscript 0 is outside the bounds of an<br>
>     > interior zero-length array ‘u_int8_t[0]’ {aka ‘unsigned char[]’}<br>
>     > [-Werror=zero-length-bounds]<br>
>     >   1333 |                 if ((h->u.ft == 3) && (h->u.m3 == 0) &&<br>
>     (h->u.m2 ==<br>
>     > 0) && (h->u.data[0] == 0x0f)) {<br>
>     >        |<br>
>     >         ~~~~~~~~~^~~<br>
>     ><br>
>     > EVEN though I added the "-Werror=zero-length-bounds" to the<br>
>     makefile as you<br>
>     > can see.<br>
>     > How do I get libpri-1.6.0 to compile on Ubuntu 22.04 LTS ?<br>
>     Just informationally, there is an open issue for this[1], but it<br>
>     hasn't<br>
>     been worked on.<br>
>     I am not sure if changing the [0] to [] will do the trick as I<br>
>     haven't<br>
>     been able to look at this yet, but you could try that.<br>
><br>
>     [1] <a href="https://issues.asterisk.org/jira/browse/PRI-189" rel="noreferrer" target="_blank">https://issues.asterisk.org/jira/browse/PRI-189</a><br>
><br>
><br>
> Problem is it references [0], [1], [2], [3], and [4]. Not just [0], so <br>
> I don't think so.<br>
> Thank you.<br>
<br>
[0] is a notation used for flexible array members, placed at the end of <br>
a struct. It does not actually mean the array is of size 0. It seems <br>
that [0] may have fallen out of use now in favor of [] which is how it <br>
is defined in the C99 standard.<br>
I have not tested this in any way whatsoever, but here is a quick <br>
patch[1] that makes it compile again, that you could try. If you do try <br>
it, let us know how it works.<br>
<br>
[1] <a href="https://gerrit.asterisk.org/c/libpri/+/19311" rel="noreferrer" target="_blank">https://gerrit.asterisk.org/c/libpri/+/19311</a></blockquote><div><br></div><div><br></div><div>These changes did allow the compile now... Thanks! </div><div><br></div><div>jerry</div><div> </div></div></div>