Bug #8395

mr_sas: sizeof on array function parameter will return size of pointer

Added by Toomas Soome 10 days ago.

Status:In ProgressStart date:2017-06-15
Priority:NormalDue date:
Assignee:Toomas Soome% Done:

90%

Category:driver - device drivers
Target version:-
Difficulty:Medium Tags:

Description

Build error from gcc 6:

../../common/io/mr_sas/mr_sas_tbolt.c:3012:21: error: 'sizeof' on array function parameter 'cdb' will return size of 'uint8_t * {aka unsigned char *}' [-Werror=sizeof-array-argument]
   bzero(cdb, sizeof (cdb));
                     ^
../../common/io/mr_sas/mr_sas_tbolt.c:2987:27: note: declared here
 mrsas_tbolt_set_pd_lba(U8 cdb[], uint8_t *cdb_len_ptr, U64 start_blk,
                           ^~~
../../common/io/mr_sas/mr_sas_tbolt.c:3045:21: error: 'sizeof' on array function parameter 'cdb' will return size of 'uint8_t * {aka unsigned char *}' [-Werror=sizeof-array-argument]
   bzero(cdb, sizeof (cdb));
                     ^
../../common/io/mr_sas/mr_sas_tbolt.c:2987:27: note: declared here
 mrsas_tbolt_set_pd_lba(U8 cdb[], uint8_t *cdb_len_ptr, U64 start_blk,
                           ^~~
../../common/io/mr_sas/mr_sas_tbolt.c:3065:21: error: 'sizeof' on array function parameter 'cdb' will return size of 'uint8_t * {aka unsigned char *}' [-Werror=sizeof-array-argument]
   bzero(cdb, sizeof (cdb));
                     ^
../../common/io/mr_sas/mr_sas_tbolt.c:2987:27: note: declared here
 mrsas_tbolt_set_pd_lba(U8 cdb[], uint8_t *cdb_len_ptr, U64 start_blk,
                           ^~~
cc1: all warnings being treated as errors

Also available in: Atom