Actions
Bug #8395
closedmr_sas: sizeof on array function parameter will return size of pointer
Start date:
2017-06-15
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
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
Updated by Electric Monk almost 5 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit 3344ffb75c0f6746eb694e4389f752801e9c7a4e
commit 3344ffb75c0f6746eb694e4389f752801e9c7a4e Author: Toomas Soome <tsoome@me.com> Date: 2017-07-25T18:33:45.000Z 8395 mr_sas: sizeof on array function parameter will return size of pointer Reviewed by: Jason King <jason.brian.king@gmail.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Marcel Telka <marcel@telka.sk> Approved by: Dan McDonald <danmcd@joyent.com>
Actions