Opened 8 years ago

Last modified 6 years ago

#1107 closed defect

Compiling with OpenBSD's gcc-4.2.1 produces 2 warnings when compiling posixunix.c — at Initial Version

Reported by: Christian Kellermann Owned by:
Priority: minor Milestone: 4.12.0
Component: core libraries Version: 4.8.x
Keywords: Cc:
Estimated difficulty: medium


The line numers differ from building the latest dev snapshot and master but the source code line is the same:

posixunix.c:9214: warning: array size (4) smaller than bound length (1024)

The line in question contains:


The second warning is generated for the line:

 t2= C_do_readlink(t1,((C_word*)t0)[2]);

Compiling with a newer gcc (4.8.2) from ports does not show these, so this might be a compiler optimisation bug in gcc or a bogus warning.

Compiling with -O0 still produced the warnings.

This has been observed on a 32-bit i386 Openbsd 5.5-current machine.

Change History (0)

Note: See TracTickets for help on using tickets.