Closed Bug 1784193 Opened 2 years ago Closed 2 years ago

Perma clang-trunk nsprpub/pr/src/md/unix/unix.c:2758:27: error: incompatible function pointer types assigning to '_MD_Fstat64' (aka 'int (*)(int, struct stat64 *)') from 'int (int, struct stat *)' [-Wincompatible-function-pointer-types]

Categories

(NSPR :: NSPR, defect, P1)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glandium, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This affects 32-bits android builds (x86 and armv7) with clang-trunk:

[task 2022-08-11T01:36:41.497Z] 01:36:41    ERROR -  /builds/worker/checkouts/gecko/nsprpub/pr/src/md/unix/unix.c:2758:27: error: incompatible function pointer types assigning to '_MD_Fstat64' (aka 'int (*)(int, struct stat64 *)') from 'int (int, struct stat *)' [-Wincompatible-function-pointer-types]
[task 2022-08-11T01:36:41.497Z] 01:36:41     INFO -      _md_iovector._fstat64 = fstat;
[task 2022-08-11T01:36:41.498Z] 01:36:41     INFO -                            ^ ~~~~~
[task 2022-08-11T01:36:41.498Z] 01:36:41    ERROR -  /builds/worker/checkouts/gecko/nsprpub/pr/src/md/unix/unix.c:2759:26: error: incompatible function pointer types assigning to '_MD_Stat64' (aka 'int (*)(const char *, struct stat64 *)') from 'int (const char *, struct stat *)' [-Wincompatible-function-pointer-types]
[task 2022-08-11T01:36:41.498Z] 01:36:41     INFO -      _md_iovector._stat64 = stat;
[task 2022-08-11T01:36:41.498Z] 01:36:41     INFO -                           ^ ~~~~

(Note this might be a Firefox build-system problem, not NSPR)

Android API < 21 didn't have fstat64 or stat64 definitions, but it did
have definitions for struct stat64 that, while being a separate struct,
is identical to struct stat. The signature for fstat and stat are thus
valid, but the compiler can't say. Clang recently added a warning for
incompatible function pointers, and it trips on using fstat and stat
because of this.

Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED

The severity field is not set for this bug.
:KaiE, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(kaie)
Severity: -- → S1
Flags: needinfo?(kaie)
Priority: -- → P1
Blocks: 1788009
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.35
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: