VirtualBox

Changeset 84675 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jun 4, 2020 12:04:10 PM (5 years ago)
Author:
vboxsync
Message:

EFI: VBoxVgaDxe/Edid: offsetof is not present with VC++ 14+, use OFFSET_OF (EFI) instead. bugref:8489

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxVgaDxe/Edid.c

    r82968 r84675  
    365365  Index = VBoxVgaVideoModeCount - 16;
    366366  VideoMode = &VBoxVgaVideoModes[Index];
    367   vmode = in_word(VBE_EXTRA_PORT, cur_info_ofs + offsetof(ModeInfoListItem, mode));
     367  vmode = in_word(VBE_EXTRA_PORT, cur_info_ofs + OFFSET_OF(ModeInfoListItem, mode));
    368368  while (vmode != VBE_VESA_MODE_END_OF_LIST)
    369369  {
    370     xres = in_word(VBE_EXTRA_PORT, cur_info_ofs + offsetof(ModeInfoListItem, info.XResolution));
    371     yres = in_word(VBE_EXTRA_PORT, cur_info_ofs + offsetof(ModeInfoListItem, info.YResolution));
     370    xres = in_word(VBE_EXTRA_PORT, cur_info_ofs + OFFSET_OF(ModeInfoListItem, info.XResolution));
     371    yres = in_word(VBE_EXTRA_PORT, cur_info_ofs + OFFSET_OF(ModeInfoListItem, info.YResolution));
    372372
    373373    if (vmode >= VBE_VBOX_MODE_CUSTOM1 && vmode <= VBE_VBOX_MODE_CUSTOM16 && xres && yres && Index < VBoxVgaVideoModeCount) {
     
    382382
    383383    cur_info_ofs += sizeof(ModeInfoListItem);
    384     vmode = in_word(VBE_EXTRA_PORT, cur_info_ofs + offsetof(ModeInfoListItem, mode));
     384    vmode = in_word(VBE_EXTRA_PORT, cur_info_ofs + OFFSET_OF(ModeInfoListItem, mode));
    385385  }
    386386  return EFI_SUCCESS;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette