Project

General

Profile

Bug #9311

ufs/mount: comparison between pointer and zero character constant

Added by Toomas Soome over 1 year ago. Updated over 1 year ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

issue found by gcc 7 build:

    mount.c:536:25: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
        if (mnt->mnt_mntopts != '\0')
                             ^~
    mount.c:536:8: note: did you mean to dereference the pointer?
        if (mnt->mnt_mntopts != '\0')
            ^
    mount.c:545:25: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
        if (mnt->mnt_mntopts != '\0')
                             ^~
    mount.c:545:8: note: did you mean to dereference the pointer?
        if (mnt->mnt_mntopts != '\0')
            ^
    cc1: all warnings being treated as errors

Of course the global mounts are only available with Cluster, so the mount should receive larger cleanup, but for now we shall just make the compiler happy.

History

#1

Updated by Electric Monk over 1 year ago

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

git commit 5ae1545d344be9f4850975114f27a93364c65969

commit  5ae1545d344be9f4850975114f27a93364c65969
Author: Toomas Soome <tsoome@me.com>
Date:   2018-03-25T18:16:18.000Z

    9311 ufs/mount: comparison between pointer and zero character constant
    Reviewed by: C Fraire <cfraire@me.com>
    Reviewed by: Jason King <jason.brian.king@gmail.com>
    Approved by: Gordon Ross <gwr@nexenta.com>

Also available in: Atom PDF