Project

General

Profile

Bug #11334

file: NULL pointer errors

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors with NULL pointer:

    magicutils.c: In function 'f_mkmtab':
    magicutils.c:309:9: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *p2++ = NULL;
             ^
    magicutils.c:323:9: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *p2++ = NULL;
             ^
    magicutils.c:334:16: error: comparison between pointer and integer [-Werror]
         if (*(p+1) == NULL) {
                    ^~
    magicutils.c:337:23: error: comparison between pointer and integer [-Werror]
         } else if (*(p+2) == NULL) { /* d? */
                           ^~
    magicutils.c:382:16: error: comparison between pointer and integer [-Werror]
         if (*(p+1) == NULL) {
                    ^~
    magicutils.c:385:23: error: comparison between pointer and integer [-Werror]
         } else if (*(p+2) == NULL) { /* u? */
                           ^~
    magicutils.c:455:9: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *p2++ = NULL;
             ^

History

#1

Updated by Electric Monk 3 months ago

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

git commit 5521b7639b10e877e2e517a3498114aaf131b72d

commit  5521b7639b10e877e2e517a3498114aaf131b72d
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-11T15:06:20.000Z

    11334 file: NULL pointer errors
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF