Project

General

Profile

Actions

Bug #9360

closed

pam_modules/tsol_acct: comparison between pointer and zero character constant

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2018-03-26
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

issue found by gcc 7 build:

    ../tsol_acct.c: In function 'pam_sm_acct_mgmt':
    ../tsol_acct.c:92:39: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
           (user == NULL) ? "NULL" : (user == '\0') ? "ZERO" :
                                           ^~
    ../tsol_acct.c:92:34: note: did you mean to dereference the pointer?
           (user == NULL) ? "NULL" : (user == '\0') ? "ZERO" :
                                      ^
    ../tsol_acct.c:94:41: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
           (rhost == NULL) ? "NULL" : (rhost == '\0') ? "ZERO" :
                                             ^~
    ../tsol_acct.c:94:35: note: did you mean to dereference the pointer?
           (rhost == NULL) ? "NULL" : (rhost == '\0') ? "ZERO" :
                                       ^
    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk over 4 years ago

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

git commit 3a05eee78b080a8a26d90f39b9efb85c9db8b5e8

commit  3a05eee78b080a8a26d90f39b9efb85c9db8b5e8
Author: Toomas Soome <tsoome@me.com>
Date:   2018-04-06T19:42:54.000Z

    9360 pam_modules/tsol_acct: comparison between pointer and zero character constant
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Reviewed by: Sebastian Wiedenroth <sebastian.wiedenroth@skylime.net>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF