[brasero/wip/hadess/fixes: 1/4] libbrasero-media: Fix memset() warning




commit a2cca499d8b7e4b8ca7030e0656f6c57e98beb88
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Sep 9 15:09:35 2021 +0200

    libbrasero-media: Fix memset() warning
    
    libbrasero-media/scsi-read-track-information.c: In function ‘brasero_read_track_info’:
    libbrasero-media/scsi-read-track-information.c:116:33: warning: argument to ‘sizeof’ in ‘memset’ call is 
the same pointer type ‘BraseroScsiTrackInfo *’ {aka ‘struct _BraseroScsiTrackInfo *’} as the destination; 
expected ‘BraseroScsiTrackInfo’ {aka ‘struct _BraseroScsiTrackInfo’} or an explicit length 
[-Wsizeof-pointer-memaccess]
      116 |         memset (&hdr, 0, sizeof (info));
          |                                 ^

 libbrasero-media/scsi-read-track-information.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libbrasero-media/scsi-read-track-information.c b/libbrasero-media/scsi-read-track-information.c
index 37644f25..6f6274ad 100644
--- a/libbrasero-media/scsi-read-track-information.c
+++ b/libbrasero-media/scsi-read-track-information.c
@@ -113,7 +113,7 @@ brasero_read_track_info (BraseroRdTrackInfoCDB *cdb,
 
        /* first ask the drive how long should the data be and then ... */
        datasize = 4;
-       memset (&hdr, 0, sizeof (info));
+       memset (&hdr, 0, sizeof (hdr));
        BRASERO_SET_16 (cdb->alloc_len, datasize);
        res = brasero_scsi_command_issue_sync (cdb, &hdr, datasize, error);
        if (res)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]