On 7/24/19 7:12 PM, h...@zytor.com wrote:
On July 24, 2019 4:15:28 PM PDT, john.hubb...@gmail.com wrote:
From: John Hubbard <jhubb...@nvidia.com>
...
+               boot_params->ext_ramdisk_image = 0;
+               boot_params->ext_ramdisk_size = 0;
+               boot_params->ext_cmd_line_ptr = 0;
+
+               memset(&boot_params->_pad4, 0, sizeof(boot_params->_pad4));
                memset(&boot_params->_pad7[0], 0,
                       (char *)&boot_params->edd_mbr_sig_buffer[0] -
                        (char *)&boot_params->_pad7[0]);

The problem with this is that it will break silently when changes are made to 
this structure.

So, that is a NAK from me.


Understood. It occurs to me, though, that it would be trivial to
just add build time assertions to check a few struct member offset
values, and fail out if they changed. That would give us everything:
warnings-free builds, and no silent failures.

Thoughts?

thanks,
--
John Hubbard
NVIDIA

Reply via email to