Project

General

Profile

Bug #11457

fs.d: NULL pointer errors

Added by Toomas Soome 4 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
filesystems (not ZFS)
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:

Description

Bjuild errors with NULL pointer:

    roll_log.c: In function 'is_mounted':
    roll_log.c:211:38: error: comparison between pointer and integer [-Werror]
      while (getmntent(mnttable, &mntbuf) == NULL) {
                                          ^~
    cc1: all warnings being treated as errors

    fslib.c: In function 'fsgetmlevel':
    fslib.c:246:24: error: comparison between pointer and integer [-Werror]
      if (cp == NULL || *cp == NULL || *cp != '/')
                            ^~
    cc1: all warnings being treated as errors

    mount.c: In function 'parse_subopts':
    mount.c:242:32: error: comparison between pointer and integer [-Werror]
         if (mountargs.sdev_attrdir == NULL)
                                    ^~
    mount.c: In function 'main':
    mount.c:346:29: error: comparison between pointer and integer [-Werror]
          mountargs.sdev_attrdir == NULL) {
                                 ^~
    cc1: all warnings being treated as errors

    clusters.c: In function 'writeCachedCluster':
    clusters.c:370:45: error: comparison between pointer and integer [-Werror]
      if (seekCluster(fd, clustInfo->clusterNum) == NULL)
                                                 ^~
    cc1: all warnings being treated as errors

    mount.c: In function 'ignore':
    mount.c:874:28: error: comparison between pointer and integer [-Werror]
      if (opts == NULL || *opts == NULL)
                                ^~
    cc1: all warnings being treated as errors

    cc1: warnings being treated as errors
    fksmbcl_main.c: In function 'do_logon':
    fksmbcl_main.c:246: error: passing argument 3 of 'smb_ctx_setpassword' makes int
    eger from pointer without a cast
    /code/illumos-gate/usr/src/lib/libsmbfs/netsmb/smbfs_api.h:139: note: expected '
    int' but argument is of type 'void *'
    *** Error code 1

    cc1: warnings being treated as errors
    autod_main.c: In function 'main':
    autod_main.c:204: error: passing argument 3 of 'door_create' makes integer from
    pointer without a cast
    /code/illumos-gate/proto/root_i386/usr/include/door.h:47: note: expected 'uint_t
    ' but argument is of type 'void *'
    autod_main.c:209: error: passing argument 3 of 'door_create' makes integer from
    pointer without a cast
    /code/illumos-gate/proto/root_i386/usr/include/door.h:47: note: expected 'uint_t
    ' but argument is of type 'void *'
    *** Error code 1

    cc1: warnings being treated as errors
    auto_subr.c: In function 'put_automountd_env':
    auto_subr.c:1081: error: comparison between pointer and integer
    auto_subr.c:1100: error: comparison between pointer and integer
    *** Error code 1

    cc1: warnings being treated as errors
    main.c: In function 'checkfilesys':
    main.c:498: error: comparison between pointer and integer
    *** Error code 1

    cc1: warnings being treated as errors
    volcopy.c: In function 'tapeck':
    volcopy.c:1248: error: cast from pointer to integer of different size [-Wpointer-to-int-cast]
    *** Error code 1

    cc1: warnings being treated as errors
    mkfs.c: In function 'main':
    mkfs.c:1443: error: comparison between pointer and integer
    *** Error code 1

    cc1: warnings being treated as errors
    tunefs.c: In function 'searchvfstab':
    tunefs.c:111: error: comparison between pointer and integer
    tunefs.c: In function 'searchmnttab':
    tunefs.c:136: error: comparison between pointer and integer
    *** Error code 1

    cc1: warnings being treated as errors
    quota.c: In function 'showquotas':
    quota.c:267: error: comparison between pointer and integer
    quota.c: In function 'quotactl':
    quota.c:687: error: comparison between pointer and integer
    *** Error code 1

    cc1: warnings being treated as errors
    quotacheck.c: In function 'main':
    quotacheck.c:197: error: comparison between pointer and integer
    quotacheck.c:236: error: comparison between pointer and integer
    quotacheck.c: In function 'quotactl':
    quotacheck.c:724: error: comparison between pointer and integer
    *** Error code 1

    cc1: warnings being treated as errors
    df.c: In function 'mkmntlist':
    df.c:1034: error: comparison between pointer and integer
    *** Error code 1

    cc1: warnings being treated as errors
    quotaon.c: In function 'main':
    quotaon.c:169: error: comparison between pointer and integer
    quotaon.c:225: error: comparison between pointer and integer
    *** Error code 1

    cc1: warnings being treated as errors
    repquota.c: In function 'quotactl':
    repquota.c:455: error: comparison between pointer and integer
    *** Error code 1

    cc1: warnings being treated as errors
    quot.c: In function 'quotall':
    quot.c:203: error: comparison between pointer and integer
    quot.c: In function 'check':
    quot.c:255: error: comparison between pointer and integer
    quot.c: In function 'getdev':
    quot.c:492: error: comparison between pointer and integer
    *** Error code 1

    cc1: warnings being treated as errors
    fsdb.c: In function 'main':
    fsdb.c:475: error: comparison between pointer and integer
    fsdb.c:1161: error: assignment makes integer from pointer without a cast
    fsdb.c:1194: error: assignment makes integer from pointer without a cast
    fsdb.c:1304: error: assignment makes integer from pointer without a cast
    fsdb.c:1438: error: assignment makes integer from pointer without a cast
    fsdb.c:1452: error: assignment makes integer from pointer without a cast
    fsdb.c:1466: error: assignment makes integer from pointer without a cast
    fsdb.c:1595: error: assignment makes integer from pointer without a cast
    fsdb.c:1614: error: assignment makes integer from pointer without a cast
    fsdb.c:1623: error: assignment makes integer from pointer without a cast
    fsdb.c:1638: error: assignment makes integer from pointer without a cast
    fsdb.c:1653: error: assignment makes integer from pointer without a cast
    fsdb.c:1676: error: assignment makes integer from pointer without a cast
    fsdb.c:1786: error: assignment makes integer from pointer without a cast
    fsdb.c:1796: error: assignment makes integer from pointer without a cast
    fsdb.c:1815: error: assignment makes integer from pointer without a cast
    fsdb.c: In function 'compare':
    fsdb.c:2712: error: comparison between pointer and integer
    fsdb.c: In function 'isnumber':
    fsdb.c:4918: error: comparison between pointer and integer

    setup.c:135: error: comparison between pointer and integer
    utilities.c:524: error: comparison between pointer and integer

    nfsmapid.c: In function 'thr_init':
    nfsmapid.c:176: error: passing argument 1 of 'thr_sigsetmask' makes integer from
     pointer without a cast
    /code/illumos-gate/proto/root_i386/usr/include/thread.h:68: note: expected 'int'
     but argument is of type 'void *'

    fsdb.c: In function 'print_desc':
    fsdb.c:372:11: error: comparison between pointer and integer [-Werror]
      if (addr != NULL) {
               ^~

    mkfs.c: In function 'main':
    mkfs.c:379:38: error: comparison between pointer and integer [-Werror]
        while ((getmntent(mnttab, &mntp)) == NULL) {
                                          ^~

    ud_lib.c: In function 'UdfTxName':
    ud_lib.c:1234:16: error: comparison between pointer and integer [-Werror]
        (unicode[i] == NULL)) {
                    ^~

    ../lib/nfs_resolve.c
    ../lib/nfs_resolve.c: In function 'setup_nb_parms':
    ../lib/nfs_resolve.c:302:45: error: comparison between pointer and integer [-Wer
    ror]
        if (strcmp(nconf->nc_protofmly, NC_INET) == NULL)
                                                 ^~
    ../lib/nfs_resolve.c:306:51: error: comparison between pointer and integer [-Wer
    ror]
        else if (strcmp(nconf->nc_protofmly, NC_INET6) == NULL)
                                                       ^~
    ../lib/nfs_resolve.c:320:45: error: comparison between pointer and integer [-Wer
    ror]
        if (strcmp(nconf->nc_protofmly, NC_INET) == NULL)
                                                 ^~
    ../lib/nfs_resolve.c:324:51: error: comparison between pointer and integer [-Wer
    ror]
        else if (strcmp(nconf->nc_protofmly, NC_INET6) == NULL)
                                                       ^~

    ../lib/ref_subr.c: In function 'nfs4_create_components':
    ../lib/ref_subr.c:194:13: error: return makes integer from pointer without a cas
    t [-Werror=int-conversion]
          return (NULL);
                 ^

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_i
    so.h:53:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82,
                     from sm_proc.c:48:
    sm_proc.c: In function 'send_notice':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing
    argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=in
    t-conversion]
     #define NULL ((void *)0)
                  ^
    sm_proc.c:684:26: note: in expansion of macro 'NULL'
         if (thr_create(NULL, NULL, thr_send_notice,
                              ^~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/rpc/rpcb_pr
    ot.h:12:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/rpc/rpcb_cl
    nt.h:58,
                     from /code/illumos-gate/proto/root_i386/usr/include/rpc/rpc.h:7
    3,
                     from sm_proc.c:54:
    /code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 's
    ize_t {aka unsigned int}' but argument is of type 'void *'
     extern int thr_create(void *, size_t, void *(*)(void *), void *, long,
                ^~~~~~~~~~

    nfsd.c: In function 'dss_init':
    nfsd.c:851:43: error: comparison between pointer and integer [-Werror]
        if (strcmp(pathnames[i], pathnames[j]) == NULL) {
                                               ^~
    nfsstat.c: In function 'main':
    nfsstat.c:238:31: error: comparison between pointer and integer [-Werror]
        if ((count <= 0) || (count == NULL))
                                   ^~

    rpc.rquotad.c:433:45: error: comparison between pointer and integer [-Werror]
       while ((status = getmntent(fstab, &mntp)) == NULL) {
                                                 ^~
    cc1: all warnings being treated as errors

Also available in: Atom PDF