Project

General

Profile

Actions

Bug #10613

closed

mr_sas: NULL pointer errors

Added by Toomas Soome about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
2019-03-30
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with NULL pointer:

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/file.h:35,
                     from ../../common/io/mr_sas/mr_sas_tbolt.c:26:
    ../../common/io/mr_sas/mr_sas_tbolt.c: In function 'mrsas_tbolt_config_pd':
    ../../common/sys/null.h:32:14: error: passing argument 5 of 'mrsas_service_evt' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/mr_sas/mr_sas_tbolt.c:3548:32: note: in expansion of macro 'NULL'
            MRSAS_EVT_UNCONFIG_TGT, NULL);
                                    ^~~~
    In file included from ../../common/io/mr_sas/mr_sas_tbolt.c:32:0:
    ../../common/io/mr_sas/mr_sas.h:1972:5: note: expected 'uint64_t {aka long unsigned int}' but argument is of type 'void *'
     int mrsas_service_evt(struct mrsas_instance *, int, int, int, uint64_t);
         ^~~~~~~~~~~~~~~~~

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/io/mr_sas/mr_sas.c:53:
    ../../common/io/mr_sas/mr_sas.c: In function 'service_mfi_aen':
    ../../common/sys/null.h:32:14: error: passing argument 5 of 'mrsas_service_evt' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/mr_sas/mr_sas.c:4216:33: note: in expansion of macro 'NULL'
             MRSAS_EVT_UNCONFIG_TGT, NULL);
                                     ^~~~
    In file included from ../../common/io/mr_sas/mr_sas.c:75:0:
    ../../common/io/mr_sas/mr_sas.h:1972:5: note: expected 'uint64_t {aka long unsigned int}' but argument is of type 'void *'
     int mrsas_service_evt(struct mrsas_instance *, int, int, int, uint64_t);
         ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/io/mr_sas/mr_sas.c:53:
    ../../common/sys/null.h:32:14: error: passing argument 5 of 'mrsas_service_evt' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/mr_sas/mr_sas.c:4232:31: note: in expansion of macro 'NULL'
           MRSAS_EVT_UNCONFIG_TGT, NULL);
                                   ^~~~
    In file included from ../../common/io/mr_sas/mr_sas.c:75:0:
    ../../common/io/mr_sas/mr_sas.h:1972:5: note: expected 'uint64_t {aka long unsigned int}' but argument is of type 'void *'
     int mrsas_service_evt(struct mrsas_instance *, int, int, int, uint64_t);
         ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/io/mr_sas/mr_sas.c:53:
    ../../common/sys/null.h:32:14: error: passing argument 5 of 'mrsas_service_evt' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/mr_sas/mr_sas.c:4243:29: note: in expansion of macro 'NULL'
           MRSAS_EVT_CONFIG_TGT, NULL);
                                 ^~~~
    In file included from ../../common/io/mr_sas/mr_sas.c:75:0:
    ../../common/io/mr_sas/mr_sas.h:1972:5: note: expected 'uint64_t {aka long unsigned int}' but argument is of type 'void *'
     int mrsas_service_evt(struct mrsas_instance *, int, int, int, uint64_t);
         ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/io/mr_sas/mr_sas.c:53:
    ../../common/sys/null.h:32:14: error: passing argument 5 of 'mrsas_service_evt' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/mr_sas/mr_sas.c:4266:35: note: in expansion of macro 'NULL'
            1, MRSAS_EVT_UNCONFIG_TGT, NULL);
                                       ^~~~
    In file included from ../../common/io/mr_sas/mr_sas.c:75:0:
    ../../common/io/mr_sas/mr_sas.h:1972:5: note: expected 'uint64_t {aka long unsigned int}' but argument is of type 'void *'
     int mrsas_service_evt(struct mrsas_instance *, int, int, int, uint64_t);
         ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/io/mr_sas/mr_sas.c:53:
    ../../common/sys/null.h:32:14: error: passing argument 5 of 'mrsas_service_evt' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/mr_sas/mr_sas.c:4280:33: note: in expansion of macro 'NULL'
            1, MRSAS_EVT_CONFIG_TGT, NULL);
                                     ^~~~
    In file included from ../../common/io/mr_sas/mr_sas.c:75:0:
    ../../common/io/mr_sas/mr_sas.h:1972:5: note: expected 'uint64_t {aka long unsigned int}' but argument is of type 'void *'
     int mrsas_service_evt(struct mrsas_instance *, int, int, int, uint64_t);
         ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/io/mr_sas/mr_sas.c:53:
    ../../common/sys/null.h:32:14: error: passing argument 5 of 'mrsas_service_evt' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/mr_sas/mr_sas.c:4303:36: note: in expansion of macro 'NULL'
             1, MRSAS_EVT_UNCONFIG_TGT, NULL);
                                        ^~~~
    In file included from ../../common/io/mr_sas/mr_sas.c:75:0:
    ../../common/io/mr_sas/mr_sas.h:1972:5: note: expected 'uint64_t {aka long unsigned int}' but argument is of type 'void *'
     int mrsas_service_evt(struct mrsas_instance *, int, int, int, uint64_t);
         ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/io/mr_sas/mr_sas.c:53:
    ../../common/sys/null.h:32:14: error: passing argument 5 of 'mrsas_service_evt' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/mr_sas/mr_sas.c:4316:34: note: in expansion of macro 'NULL'
             1, MRSAS_EVT_CONFIG_TGT, NULL);
                                      ^~~~
    In file included from ../../common/io/mr_sas/mr_sas.c:75:0:
    ../../common/io/mr_sas/mr_sas.h:1972:5: note: expected 'uint64_t {aka long unsigned int}' but argument is of type 'void *'
     int mrsas_service_evt(struct mrsas_instance *, int, int, int, uint64_t);
         ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/io/mr_sas/mr_sas.c:53:
    ../../common/io/mr_sas/mr_sas.c: In function 'mrsas_config_ld':
    ../../common/sys/null.h:32:14: error: passing argument 5 of 'mrsas_service_evt' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/mr_sas/mr_sas.c:7593:32: note: in expansion of macro 'NULL'
            MRSAS_EVT_UNCONFIG_TGT, NULL);
                                    ^~~~
    In file included from ../../common/io/mr_sas/mr_sas.c:75:0:
    ../../common/io/mr_sas/mr_sas.h:1972:5: note: expected 'uint64_t {aka long unsigned int}' but argument is of type 'void *'
     int mrsas_service_evt(struct mrsas_instance *, int, int, int, uint64_t);
         ^~~~~~~~~~~~~~~~~
    ../../common/io/mr_sas/mr_sas.c: In function 'mrsas_mode_sense_build':
    ../../common/io/mr_sas/mr_sas.c:7836:10: error: return makes integer from pointer without a cast [-Werror=int-conversion]
       return (NULL);
              ^
    ../../common/io/mr_sas/mr_sas.c:7874:9: error: return makes integer from pointer without a cast [-Werror=int-conversion]
      return (NULL);
             ^
    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk about 3 years ago

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

git commit 97ac1f6486eb9b87b187039bec20569f99135a8d

commit  97ac1f6486eb9b87b187039bec20569f99135a8d
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-05T04:53:07.000Z

    10613 mr_sas: NULL pointer errors
    Reviewed by: Gergő Doma <domag02@gmail.com>
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF