VirtualBox

Opened 15 years ago

Closed 15 years ago

#3048 closed enhancement (fixed)

some run-time asserts can be compile-time

Reported by: Dmytro Gorbunov Owned by:
Component: other Version: VirtualBox 2.1.0
Keywords: Cc:
Guest type: other Host type: other

Description

I've found a lot of run-time asserts that can be complite-time using my script placed in http://savesources.com/public/scanStaticAssert.pl.txt

Part of output ..... /vbox/src/VBox/Devices/Storage/swab.h: Assert(sizeof(BMDMADesc) == 8); /vbox/src/VBox/Devices/Network/DrvTAPWin.cpp: Assert(sizeof(pThis->MacConfigured) == 6); /vbox/src/VBox/Devices/Network/DrvTAPWin.cpp: Assert(sizeof(pThis->abSendBuf) == RT_ALIGN_Z(sizeof(pThis->abSendBuf), 16)); /vbox/src/VBox/Devices/Graphics/DevVGAModes.h: Assert(sizeof(s->sr) >= 8); /vbox/src/VBox/Devices/Graphics/DevVGAModes.h: Assert(sizeof(s->cr) >= 24); /vbox/src/VBox/Devices/Graphics/DevVGAModes.h: Assert(sizeof(s->ar) >= 0x14); ....

Best regards, Dmytro Gorbunov http://savesources.com

Change History (1)

comment:1 by Frank Mehnert, 15 years ago

Resolution: fixed
Status: newclosed

Thanks for this suggestion and we will fix some of them. However, these assertions don't cause any runtime overhead for the normal release as Assert is a nop for release builds.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use