Project

General

Profile

Bug #11107

mcs: NULL pointer errors

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

NULL pointer errors:

    ../common/utils.c: In function 'compress':
    ../common/utils.c:469:23: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       strings[next_str++] = NULL;
                           ^

    ../common/utils.c: In function 'compress':
    ../common/utils.c:469:23: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       strings[next_str++] = NULL;
                           ^
    ../common/utils.c: In function 'dohash':
    ../common/utils.c:531:31: error: comparison between pointer and integer [-Werror]
      for (shift = 0; (t = *str++) != NULL; shift += 7) {
                                   ^~

    ../common/file.c: In function 'each_file':
    ../common/file.c:118:23: error: comparison between pointer and integer [-Werror]
            (mode_t)0666)) == NULL) {
                           ^~
    ../common/file.c: In function 'build_file':
    ../common/file.c:719:52: error: comparison between pointer and integer [-Werror]
      if (gelf_newehdr(dst_elf, gelf_getclass(src_elf)) == NULL) {
                                                        ^~
    ../common/file.c:746:48: error: comparison between pointer and integer [-Werror]
       if (gelf_newphdr(dst_elf, src_ehdr->e_phnum) == NULL) {
                                                    ^~
    ../common/file.c:1044:25: error: comparison between pointer and integer [-Werror]
       if (src_ehdr->e_phnum != NULL)
                             ^~
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 4 months ago

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

git commit 6888a8ba15f151decee7821a09e34fed2fb63513

commit  6888a8ba15f151decee7821a09e34fed2fb63513
Author: Toomas Soome <tsoome@me.com>
Date:   2019-06-24T18:12:18.000Z

    11107 mcs: NULL pointer errors
    Reviewed by: Jason Lippert <jason@glasspelican.ca>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF