VirtualBox

Changeset 96325 in vbox for trunk/include


Ignore:
Timestamp:
Aug 19, 2022 8:50:16 AM (2 years ago)
Author:
vboxsync
Message:

include/VBox/VBoxGuest.h: Solaris build fix for a narrowing conversion
identified by gcc 12.1.0: VBGL_IOCTL_CODE_SIZE expands to _IOWRN which
casts its result to an 'int' but is passed to routines expecting a
'uintptr_t'. gcc correctly flags this via [-Wnarrowing] with an error
message like: "narrowing conversion of ‘-1072146881’ from ‘int’ to ‘long
unsigned int’".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxGuest.h

    r95794 r96325  
    126126  /* No automatic buffering, size limited to 255 bytes => use VBGLBIGREQ for everything. */
    127127# include <sys/ioccom.h>
    128 # define VBGL_IOCTL_CODE_SIZE(Function, Size)       _IOWRN('V', (Function), sizeof(VBGLREQHDR))
     128# define VBGL_IOCTL_CODE_SIZE(Function, Size)       ((uintptr_t)(_IOWRN('V', (Function), sizeof(VBGLREQHDR))))
    129129# define VBGL_IOCTL_CODE_BIG(Function)              _IOWRN('V', (Function), sizeof(VBGLREQHDR))
    130130# define VBGL_IOCTL_CODE_FAST(Function)             _IO(   'F', (Function))
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