Ticket #1361 (closed bug: fixed)

Opened 12 years ago

Last modified 12 years ago

src/runcore/profiling.c: Can't use attribute nonnull on a non-pointer operand

Reported by: doughera Owned by:
Priority: normal Milestone:
Component: build Version: 1.8.0
Severity: fatal Keywords:
Cc: Language:
Patch status: new Platform:

Description

As of r42927, gcc-4.3.2 complains about the attribute nonnull on a non-pointer operand:

src/runcore/profiling.c:59: error: nonnull argument references non-pointer operand (argument 1, operand 2)

The attached patch fixes the error by removing the attribute.

Attachments

tt1361-profiling.patch Download (463 bytes) - added by doughera 12 years ago.
tt1361-profiling-v2.patch Download (1.2 KB) - added by doughera 12 years ago.

Change History

Changed 12 years ago by doughera

Changed 12 years ago by doughera

Changed 12 years ago by doughera

I know that the section patched in the above patch is inside a HEADERIZER block, but according to the headerizer docs, treating static functions is on the TODO list. Since the function in question here is a static function, I hadn't assumed it would actually work, but instead posted something quickly in order to help unbreak the build.

It turns out headerizer does actually work for that file. The correct ARG* incantation to be used doesn't seem to be documented, but reading the code, it looks like ARGIN_NULLOK is what is needed. (Curiously, I see no way to specify an integer argument that must be non-zero, but that ends up not being relevant here.)

I have attached a newer version of the patch that runs the headerizer.

Changed 12 years ago by darbelo

  • status changed from new to closed
  • resolution set to fixed

Fixed in r42929.

Note: See TracTickets for help on using tickets.