Re: [PATCH v2] staging: vt6655: use memset to make code clearer

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

 



On Fri, Sep 9, 2022 at 12:23 PM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> Why do you have to cast this to (void *)?  That should almost never be
> needed.

Because I want to suppress a compiler warning:
drivers/staging/vt6655/device_main.c:869:9: warning: passing argument
1 of ‘memset’ discards ‘volatile’ qualifier from pointer target type
[-Wdiscarded-qualifiers]
  869 |  memset(&rd->rd0, 0, sizeof(rd->rd0));
      |         ^~~~~~~~

Best regards,
Nam





[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux