Closed Bug 1904395 Opened 3 months ago Closed 2 months ago

clang-18 build failure due to incompatible function types

Categories

(NSPR :: NSPR, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jschanck, Assigned: KaiE)

References

Details

Attachments

(1 file, 1 obsolete file)

When building with clang-18, I get

../../../pr/tests/testfile.c:576:31: error: incompatible function pointer types passing 'PRInt32 (void *)' (aka 'int (void *)') to parameter of type 'void (*)(void *)' [-Wincompatible-function-pointer-types]
  576 |                               DirTest, &thrarg,
      |                               ^~~~~~~
../../../pr/tests/testfile.c:93:36: note: passing argument to parameter 'start' here
   93 |                             void (*start)(void *arg),
      |                                    ^

I took a crack at fixing it, but the test itself is in pretty rough shape---I'm not sure it's useful, or even correct, as is.

See Also: → 1904404

Same with GCC 14.

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

For more information, please visit BugBot documentation.

Flags: needinfo?(kaie)
Assignee: nobody → kaie
Status: NEW → ASSIGNED

What do you think about my patch?
It tries to fix the pointer types.

Flags: needinfo?(kaie)
Attachment #9414815 - Attachment is obsolete: true
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 4.36
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: