adafruit / ArduinoCore-samd

116 stars 119 forks source link

Narrowly silence new (GCC 8.1+) warning #290

Closed henrygab closed 3 years ago

henrygab commented 3 years ago

Fixes #287

The warnings look like:

      Line 338 Char 37
      warning: 'void* memcpy(void*, const void*, size_t)' 
               writing to an object of type 'struct DmacDescriptor'
               with no trivial copy-assignment [-Wclass-memaccess]
hathach commented 3 years ago

The above solution does not work due to trivial class initialization issue, I have come to using the good-old void* that could suppress the warning

            memcpy((void*) &extraReadDescriptors[i], firstReadDescriptor,
              sizeof(DmacDescriptor));