Project

General

Profile

Actions

Bug #1811

closed

Bug #1450: Illumos should be buildable with GCC4

hal uses non-pointer NULL as g_strconcat sentinel

Added by Rich Lowe almost 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
2011-11-23
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

g_strconcat is a vararg function from glib, which takes a sentinel NULL. This should be pointer sized.

Unfortunately, in hal_dbus.c, we end up with one of our non-pointer NULL's, and GCC4 warns. We should cast this NULL to (void *), to be sure it ends up as (void *)0 or (void *)0L, and thus uintptr_t in size.

This basic bug is all over our codebase, but in ways which GCC cannot check. Future changes will allow GCC to notice, and expose them all (noisily).

Actions #1

Updated by Rich Lowe almost 10 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 60 to 100

Resolved in r13531 commit:95e596551b5c

Actions

Also available in: Atom PDF