Opened 6 years ago

Closed 6 years ago

#737 closed defect (fixed)

PCUT_ASSERT_NULL does not accept const pointer

Reported by: Jiri Svoboda Owned by:
Priority: major Milestone: 0.8.0
Component: helenos/lib/other Version: mainline
Keywords: pcut Cc:
Blocker for: Depends on:
See also:

Description

The following code:

const void *a = NULL;
PCUT_ASSERT_NULL(a);

will produce a warning like

../../lib/pcut/include/pcut/asserts.h:150:25: error: initialization discards
'const' qualifier from pointer target type [-Werror=discarded-qualifiers]

Change History (1)

comment:1 by Vojtech Horky, 6 years ago

Keywords: pcut added
Resolution: fixed
Status: newclosed

Funny, this happens only in PCUT_ASSERT_NULL not with PCUT_ASSERT_NOT_NULL.

Anyway, fixed upstream in 1ccf66e and in HelenOS via 4b54bd956b3a.

Note: See TracTickets for help on using tickets.