avoid memset-zero-length error on gcc