[c++,compat] rename variables clashing with c++ keywords

This commit is contained in:
Armin Novak
2026-01-08 09:23:53 +01:00
parent 9321d09495
commit 902aee4df1
6 changed files with 19 additions and 19 deletions

View File

@@ -157,9 +157,9 @@ static BOOL log_libusb_result_(wLog* log, DWORD lvl, WINPR_FORMAT_ARG const char
#define log_libusb_result(log, lvl, fmt, error, ...) \
log_libusb_result_((log), (lvl), (fmt), __func__, __FILE__, __LINE__, error, ##__VA_ARGS__)
const char* usb_interface_class_to_string(uint8_t class)
const char* usb_interface_class_to_string(uint8_t c_class)
{
switch (class)
switch (c_class)
{
case LIBUSB_CLASS_PER_INTERFACE:
return "LIBUSB_CLASS_PER_INTERFACE";

View File

@@ -72,6 +72,6 @@ size_t udev_new_by_id(URBDRC_PLUGIN* urbdrc, libusb_context* ctx, UINT16 idVendo
IUDEVICE*** devArray);
IUDEVICE* udev_new_by_addr(URBDRC_PLUGIN* urbdrc, libusb_context* context, BYTE bus_number,
BYTE dev_number);
const char* usb_interface_class_to_string(uint8_t class);
const char* usb_interface_class_to_string(uint8_t c_class);
#endif /* FREERDP_CHANNEL_URBDRC_CLIENT_LIBUSB_UDEVICE_H */

View File

@@ -101,14 +101,14 @@ static BOOL register_input_events(xfContext* xfc, Window window)
for (int j = 0; j < dev->num_classes; j++)
{
const XIAnyClassInfo* class = dev->classes[j];
const XIAnyClassInfo* c_class = dev->classes[j];
switch (class->type)
switch (c_class->type)
{
case XITouchClass:
if (freerdp_settings_get_bool(settings, FreeRDP_MultiTouchInput))
{
const XITouchClassInfo* t = (const XITouchClassInfo*)class;
const XITouchClassInfo* t = (const XITouchClassInfo*)c_class;
if (t->mode == XIDirectTouch)
{
WLog_DBG(
@@ -124,7 +124,7 @@ static BOOL register_input_events(xfContext* xfc, Window window)
break;
case XIButtonClass:
{
const XIButtonClassInfo* t = (const XIButtonClassInfo*)class;
const XIButtonClassInfo* t = (const XIButtonClassInfo*)c_class;
WLog_DBG(TAG, "%s button device (id: %d, mode: %d)", dev->name, dev->deviceid,
t->num_buttons);
XISetMask(masks[nmasks], XI_ButtonPress);
@@ -139,7 +139,7 @@ static BOOL register_input_events(xfContext* xfc, Window window)
if (!log)
log = WLog_Get(TAG);
const XIValuatorClassInfo* t = (const XIValuatorClassInfo*)class;
const XIValuatorClassInfo* t = (const XIValuatorClassInfo*)c_class;
char* name = t->label ? Safe_XGetAtomName(log, xfc->display, t->label) : NULL;
WLog_Print(log, WLOG_DEBUG,

View File

@@ -192,7 +192,7 @@ int LogDynAndXConvertSelection_ex(wLog* log, const char* file, const char* fkt,
int LogDynAndXGetWindowProperty_ex(wLog* log, const char* file, const char* fkt, size_t line,
Display* display, Window w, Atom property, long long_offset,
long long_length, int delete, Atom req_type,
long long_length, int c_delete, Atom req_type,
Atom* actual_type_return, int* actual_format_return,
unsigned long* nitems_return, unsigned long* bytes_after_return,
unsigned char** prop_return)
@@ -204,13 +204,13 @@ int LogDynAndXGetWindowProperty_ex(wLog* log, const char* file, const char* fkt,
write_log(
log, log_level, file, fkt, line,
"XGetWindowProperty(%p, %lu, %s [%lu], %ld, %ld, %d, %s [%lu], %p, %p, %p, %p, %p)",
(void*)display, w, propstr, property, long_offset, long_length, delete, req_type_str,
(void*)display, w, propstr, property, long_offset, long_length, c_delete, req_type_str,
req_type, (void*)actual_type_return, (void*)actual_format_return, (void*)nitems_return,
(void*)bytes_after_return, (void*)prop_return);
XFree(propstr);
XFree(req_type_str);
}
const int rc = XGetWindowProperty(display, w, property, long_offset, long_length, delete,
const int rc = XGetWindowProperty(display, w, property, long_offset, long_length, c_delete,
req_type, actual_type_return, actual_format_return,
nitems_return, bytes_after_return, prop_return);
return write_result_log_expect_success(log, WLOG_WARN, file, fkt, line, display,
@@ -461,14 +461,14 @@ XImage* LogDynAndXCreateImage_ex(wLog* log, const char* file, const char* fkt, s
Window LogDynAndXCreateWindow_ex(wLog* log, const char* file, const char* fkt, size_t line,
Display* display, Window parent, int x, int y, unsigned int width,
unsigned int height, unsigned int border_width, int depth,
unsigned int class, Visual* visual, unsigned long valuemask,
unsigned int c_class, Visual* visual, unsigned long valuemask,
XSetWindowAttributes* attributes)
{
if (WLog_IsLevelActive(log, log_level))
{
write_log(log, log_level, file, fkt, line, "XCreateWindow(%p)", (void*)display);
}
return XCreateWindow(display, parent, x, y, width, height, border_width, depth, class, visual,
return XCreateWindow(display, parent, x, y, width, height, border_width, depth, c_class, visual,
valuemask, attributes);
}

View File

@@ -62,7 +62,7 @@ int LogDynAndXFreePixmap_ex(wLog* log, const char* file, const char* fkt, size_t
Window LogDynAndXCreateWindow_ex(wLog* log, const char* file, const char* fkt, size_t line,
Display* display, Window parent, int x, int y, unsigned int width,
unsigned int height, unsigned int border_width, int depth,
unsigned int class, Visual* visual, unsigned long valuemask,
unsigned int c_class, Visual* visual, unsigned long valuemask,
XSetWindowAttributes* attributes);
#define LogDynAndXRaiseWindow(log, display, w) \
@@ -127,7 +127,7 @@ int LogDynAndXClearWindow_ex(wLog* log, const char* file, const char* fkt, size_
int LogDynAndXGetWindowProperty_ex(wLog* log, const char* file, const char* fkt, size_t line,
Display* display, Window w, Atom property, long long_offset,
long long_length, Bool delete, Atom req_type,
long long_length, Bool c_delete, Atom req_type,
Atom* actual_type_return, int* actual_format_return,
unsigned long* nitems_return, unsigned long* bytes_after_return,
unsigned char** prop_return);

View File

@@ -1322,7 +1322,7 @@ static int x11_shadow_subsystem_init(rdpShadowSubsystem* sub)
char** extensions = NULL;
XVisualInfo* vi = NULL;
XVisualInfo* vis = NULL;
XVisualInfo template = { 0 };
XVisualInfo xtemplate = { 0 };
XPixmapFormatValues* pf = NULL;
XPixmapFormatValues* pfs = NULL;
@@ -1382,9 +1382,9 @@ static int x11_shadow_subsystem_init(rdpShadowSubsystem* sub)
}
XFree(pfs);
template.class = TrueColor;
template.screen = subsystem->number;
vis = XGetVisualInfo(subsystem->display, VisualClassMask | VisualScreenMask, &template,
xtemplate.class = TrueColor;
xtemplate.screen = subsystem->number;
vis = XGetVisualInfo(subsystem->display, VisualClassMask | VisualScreenMask, &xtemplate,
&vi_count);
if (!vis)