Project

General

Profile

Actions

Bug #11345

closed

halt: NULL pointer errors

Added by Toomas Soome almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with NULL pointer:

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82,
                     from halt.c:52:
    halt.c: In function 'main':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    halt.c:1266:19: note: in expansion of macro 'NULL'
      uintptr_t mdep = NULL;
                       ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'uadmin' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    halt.c:1611:36: note: in expansion of macro 'NULL'
       (void) uadmin(A_DUMP, AD_NOSYNC, NULL);
                                        ^~~~
    In file included from halt.c:58:0:
    /code/illumos-gate/proto/root_i386/usr/include/sys/uadmin.h:165:12: note: expected 'uintptr_t {aka unsigned int}' but argument is of type 'void *'
     extern int uadmin(int, int, uintptr_t);
                ^~~~~~
    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk almost 3 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

git commit 1940b2a8f27c546bb66a973012e36f32123042ca

commit  1940b2a8f27c546bb66a973012e36f32123042ca
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-12T06:02:09.000Z

    11345 halt: NULL pointer errors
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF