VirtualBox

Ignore:
Timestamp:
Nov 30, 2007 2:21:05 PM (17 years ago)
Author:
vboxsync
Message:

Guest Additions (Linux): replaced compiler_assert by AssertCompiler in the kernel module

Location:
trunk/src/VBox/Additions/linux/module
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/module/hgcmcall.c

    r4996 r5893  
    2424#include "vboxmod.h"
    2525#include "waitcompat.h"
     26
    2627#include <VBox/log.h>
     28#include <iprt/assert.h>
    2729
    2830
     
    290292    int rc;
    291293
    292     compiler_assert(_IOC_SIZE(IOCTL_VBOXGUEST_HGCM_CALL) == sizeof(VBoxGuestHGCMCallInfo));
     294    AssertCompiler((_IOC_SIZE(IOCTL_VBOXGUEST_HGCM_CALL) == sizeof(VBoxGuestHGCMCallInfo)));
    293295    /* Get the call header from user space to see how many call parameters there are. */
    294296    if (copy_from_user(&callHeader, (void*)arg, sizeof(callHeader)))
  • trunk/src/VBox/Additions/linux/module/vboxmod.c

    r5867 r5893  
    2323#include "vboxmod.h"
    2424#include "waitcompat.h"
     25
    2526#include <VBox/log.h>
    2627#include <iprt/asm.h>
     
    372373            int rc;
    373374
    374             compiler_assert(sizeof(VMMDevRequestHeader) == _IOC_SIZE(IOCTL_VBOXGUEST_VMMREQUEST));
     375            AssertCompiler((sizeof(VMMDevRequestHeader) == _IOC_SIZE(IOCTL_VBOXGUEST_VMMREQUEST)));
    375376            if (copy_from_user(&reqHeader, (void*)arg, _IOC_SIZE(cmd)))
    376377            {
  • trunk/src/VBox/Additions/linux/module/vboxmod.h

    r5817 r5893  
    6767if (n >= vboxadd_verbosity) printk (KERN_DEBUG "vboxadd: " __VA_ARGS__)
    6868
    69 #define compiler_assert(val) \
    70 do { \
    71 switch(0) { \
    72 case 0: \
    73 case (val): \
    74 default: \
    75 break; \
    76 } \
    77 } while(0);
    78 
    7969extern int vboxadd_cmc_init (void);
    8070extern void vboxadd_cmc_fini (void);
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