Project

General

Profile

Bug #10393

ctf: NULL pointer errors

Added by Toomas Soome 5 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
tools - gate/build tools
Start date:
2019-02-11
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors with NULL pointer:

    /code/illumos-gate/usr/src/lib/libctf/common/ctf_elfwrite.c: In function 'ctf_wr
    ite_elf':
    /code/illumos-gate/usr/src/lib/libctf/common/ctf_elfwrite.c:71:44: error: compar
    ison between pointer and integer [-Werror]
      if (gelf_newehdr(dst, gelf_getclass(src)) == NULL) {
                                                ^~
    /code/illumos-gate/usr/src/lib/libctf/common/ctf_elfwrite.c:111:32: error: compa
    rison between pointer and integer [-Werror]
       if (gelf_newphdr(dst, nphdr) == NULL) {
                                    ^~
    /code/illumos-gate/usr/src/lib/libctf/common/ctf_elfwrite.c:269:37: error: compa
    rison between pointer and integer [-Werror]
       if (gelf_update_shdr(dscn, &shdr) == NULL) {
                                         ^~
    /code/illumos-gate/usr/src/lib/libctf/common/ctf_elfwrite.c:354:36: error: compa
    rison between pointer and integer [-Werror]
      if (gelf_update_ehdr(dst, &dehdr) == NULL) {
                                        ^~

    /code/illumos-gate/usr/src/common/ctf/ctf_create.c: In function 'ctf_add_function':
    /code/illumos-gate/usr/src/common/ctf/ctf_create.c:1989:14: error: comparison between pointer and integer [-Werror]
      if (symbase == NULL)
                  ^~
    /code/illumos-gate/usr/src/common/ctf/ctf_create.c: In function 'ctf_add_object':
    /code/illumos-gate/usr/src/common/ctf/ctf_create.c:2056:14: error: comparison between pointer and integer [-Werror]
      if (symbase == NULL)
                  ^~

    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 5 months ago

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

git commit e83359656fe4880d77df4da075573820c2a7adc0

commit  e83359656fe4880d77df4da075573820c2a7adc0
Author: Toomas Soome <tsoome@me.com>
Date:   2019-02-12T15:49:21.000Z

    10393 ctf: NULL pointer errors
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF