You can disable this warning right before the line which invokes it and restore it back afterwards https://godbolt.org/z/W-XR-Q:
#include <string.h>void dummy(void){ int i[42]; int *pi[42]; const int *pci[42]; memset(i, 0, sizeof i); memset(pi, 0, sizeof pi);#pragma warning( push )#pragma warning( disable : 4090) memset(pci, 0, sizeof pci); // NO warning C4090#pragma warning( pop ) }