Project

General

Profile

Actions

Bug #11333

closed

exstr: NULL pointer errors

Added by Toomas Soome over 4 years ago. Updated over 4 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Build errors with NULL pointer:

    exstr.c: In function 'replace':
    exstr.c:289:28: error: comparison between pointer and integer [-Werror]
       if (strcmp(repbuf, name) != NULL)
                                ^~
    cc1: all warnings being treated as errors

Actions #1

Updated by Dan McDonald over 4 years ago

Part of this bug's cleanup was to remove some explicity-declarations of system functions like exit() and properly use stdlib.h. A side-effect of this is that the binary shrinks slightly in size since exit() in stdlib.h includes the does-not-return hint, which compilers use to eliminate useless return code. This makes reality-checking no change otherwise harder.

Actions #2

Updated by Electric Monk over 4 years ago

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

git commit bcc2c2b83b7fa504ab39a003964e07c06e7af053

commit  bcc2c2b83b7fa504ab39a003964e07c06e7af053
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-11T15:00:55.000Z

    11333 exstr: 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