My code compiles without error, but what does this mean?
etherate.cpp:432:11: warning: deleting array ‘unsigned char broadMAC [6]’ [enabled by default]
Its from this line, where I am deleting an unsigned char array;
delete [] broadMAC;
Is it OK to leave this as it is, if not, how could I improve upon this?
Thanks.
UPDATE
How is broadMAC declared?
From about 10 lines previous;
unsigned char broadMAC[6] = {destMAC[0], destMAC[1], destMAC[2], destMAC[3], destMAC[4], destMAC[5]};
destMAC is also an unsigned char array with values stored inside it.
I needed to copy them out, do something with destMAC, then restore the original values; so I have declared broadMAC and wish to delete it after.
G++ allows to enable and disable many warnings (e.g.
-Wctor-dtor-privacy,-Woverloaded-virtual,-W...) by specifying them on the command line. Some warnings are enabled, without the need to do so on the command line, others must be explicitly requested.So, some warnings are:
and some are: