Merge pull request #10654 from akallabeth/unused-macros

[warnings] remove or comment unused macros
This commit is contained in:
akallabeth 2024-09-20 19:23:45 +02:00 committed by GitHub
commit 7fc4f528c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
48 changed files with 53 additions and 130 deletions

View File

@ -33,8 +33,6 @@
#include "sdl_select.hpp"
#include "sdl_selectlist.hpp"
#define TAG CLIENT_TAG("SDL.dialogs")
enum
{
SHOW_DIALOG_ACCEPT_REJECT = 1,

View File

@ -28,8 +28,6 @@
#include <SDL_mouse.h>
#define TAG CLIENT_TAG("SDL.pointer")
using sdlPointer = struct
{
rdpPointer pointer;

View File

@ -30,8 +30,6 @@
#include <SDL.h>
#define TAG CLIENT_TAG("SDL.touch")
BOOL sdl_scale_coordinates(SdlContext* sdl, Uint32 windowId, INT32* px, INT32* py,
BOOL fromLocalToRDP, BOOL applyOffset)
{

View File

@ -33,8 +33,6 @@
#include "sdl_select.hpp"
#include "sdl_selectlist.hpp"
#define TAG CLIENT_TAG("SDL.dialogs")
enum
{
SHOW_DIALOG_ACCEPT_REJECT = 1,

View File

@ -28,8 +28,6 @@
#include <SDL3/SDL_mouse.h>
#define TAG CLIENT_TAG("SDL.pointer")
typedef struct
{
rdpPointer pointer;

View File

@ -30,8 +30,6 @@
#include <SDL3/SDL.h>
#define TAG CLIENT_TAG("SDL.touch")
BOOL sdl_scale_coordinates(SdlContext* sdl, Uint32 windowId, INT32* px, INT32* py,
BOOL fromLocalToRDP, BOOL applyOffset)
{

View File

@ -38,8 +38,6 @@
#define TAG CLIENT_TAG("wayland.cliprdr")
#define MAX_CLIPBOARD_FORMATS 255
#define mime_text_plain "text/plain"
#define mime_text_utf8 mime_text_plain ";charset=utf-8"

View File

@ -35,8 +35,6 @@
#include "wlfreerdp.h"
#include "wlf_input.h"
#define TAG CLIENT_TAG("wayland.input")
static BOOL scale_signed_coordinates(rdpContext* context, int32_t* x, int32_t* y,
BOOL fromLocalToRDP)
{

View File

@ -53,7 +53,6 @@
#define TAG CLIENT_TAG("x11.cliprdr")
#define MAX_CLIPBOARD_FORMATS 255
#define WIN32_FILETIME_TO_UNIX_EPOCH_USEC UINT64_C(116444736000000000)
#ifdef WITH_DEBUG_CLIPRDR
#define DEBUG_CLIPRDR(...) WLog_DBG(TAG, __VA_ARGS__)

View File

@ -42,15 +42,6 @@
#define FLOATBAR_COLOR_BORDER "RGB:75/9a/c8"
#define FLOATBAR_COLOR_FOREGROUND "RGB:FF/FF/FF"
#ifdef WITH_DEBUG_X11
#define DEBUG_X11(...) WLog_DBG(TAG, __VA_ARGS__)
#else
#define DEBUG_X11(...) \
do \
{ \
} while (0)
#endif
#define XF_FLOATBAR_MODE_NONE 0
#define XF_FLOATBAR_MODE_DRAGGING 1
#define XF_FLOATBAR_MODE_RESIZE_LEFT 2

View File

@ -77,25 +77,25 @@
/* bit definitions for MwmHints.flags */
#define MWM_HINTS_FUNCTIONS (1L << 0)
#define MWM_HINTS_DECORATIONS (1L << 1)
#define MWM_HINTS_INPUT_MODE (1L << 2)
#define MWM_HINTS_STATUS (1L << 3)
// #define MWM_HINTS_INPUT_MODE (1L << 2)
// #define MWM_HINTS_STATUS (1L << 3)
/* bit definitions for MwmHints.functions */
#define MWM_FUNC_ALL (1L << 0)
#define MWM_FUNC_RESIZE (1L << 1)
#define MWM_FUNC_MOVE (1L << 2)
#define MWM_FUNC_MINIMIZE (1L << 3)
#define MWM_FUNC_MAXIMIZE (1L << 4)
#define MWM_FUNC_CLOSE (1L << 5)
// #define MWM_FUNC_RESIZE (1L << 1)
// #define MWM_FUNC_MOVE (1L << 2)
// #define MWM_FUNC_MINIMIZE (1L << 3)
// #define MWM_FUNC_MAXIMIZE (1L << 4)
// #define MWM_FUNC_CLOSE (1L << 5)
/* bit definitions for MwmHints.decorations */
#define MWM_DECOR_ALL (1L << 0)
#define MWM_DECOR_BORDER (1L << 1)
#define MWM_DECOR_RESIZEH (1L << 2)
#define MWM_DECOR_TITLE (1L << 3)
#define MWM_DECOR_MENU (1L << 4)
#define MWM_DECOR_MINIMIZE (1L << 5)
#define MWM_DECOR_MAXIMIZE (1L << 6)
// #define MWM_DECOR_BORDER (1L << 1)
// #define MWM_DECOR_RESIZEH (1L << 2)
// #define MWM_DECOR_TITLE (1L << 3)
// #define MWM_DECOR_MENU (1L << 4)
// #define MWM_DECOR_MINIMIZE (1L << 5)
// #define MWM_DECOR_MAXIMIZE (1L << 6)
#define PROP_MOTIF_WM_HINTS_ELEMENTS 5

View File

@ -55,7 +55,6 @@
#include <freerdp/client/client_cliprdr_file.h>
#define MAX_CLIP_DATA_DIR_LEN 10
#define MAX_CLIPBOARD_FORMATS 255
#define NO_CLIP_DATA_ID (UINT64_C(1) << 32)
#define WIN32_FILETIME_TO_UNIX_EPOCH UINT64_C(11644473600)

View File

@ -57,13 +57,13 @@
static const BYTE BOM_UTF16_LE[2] = { 0xFF, 0xFE };
#define INVALID_INTEGER_VALUE 0xFFFFFFFF
// #define INVALID_INTEGER_VALUE 0xFFFFFFFF
#define RDP_FILE_LINE_FLAG_FORMATTED 0x00000001
#define RDP_FILE_LINE_FLAG_STANDARD 0x00000002
// #define RDP_FILE_LINE_FLAG_STANDARD 0x00000002
#define RDP_FILE_LINE_FLAG_TYPE_STRING 0x00000010
#define RDP_FILE_LINE_FLAG_TYPE_INTEGER 0x00000020
#define RDP_FILE_LINE_FLAG_TYPE_BINARY 0x00000040
// #define RDP_FILE_LINE_FLAG_TYPE_BINARY 0x00000040
struct rdp_file_line
{

View File

@ -48,6 +48,7 @@ if (ENABLE_WARNING_VERBOSE)
-Wno-c++98-compat
-Wno-c++98-compat-pedantic
-Wno-pre-c++17-compat
-Wno-exit-time-destructors
)
endif()

View File

@ -26,11 +26,8 @@
#include <freerdp/freerdp.h>
#include <freerdp/constants.h>
#include <freerdp/log.h>
#include <freerdp/cache/persistent.h>
#define TAG FREERDP_TAG("cache.persistent")
struct rdp_persistent_cache
{
FILE* fp;

View File

@ -67,10 +67,10 @@
#include "dsp_ffmpeg.h"
#endif
#define TAG FREERDP_TAG("dsp")
#if !defined(WITH_DSP_FFMPEG)
#define TAG FREERDP_TAG("dsp")
typedef union
{
struct

View File

@ -26,14 +26,16 @@
#include "../nsc_types.h"
#include "nsc_neon.h"
#define TAG FREERDP_TAG("codec.nsc.neon")
#if defined(WITH_NEON)
#if defined(_M_ARM64) || defined(_M_ARM)
#define NEON_ENABLED
#endif
#endif
#if defined(NEON_ENABLED)
#define TAG FREERDP_TAG("codec.nsc.neon")
#endif
void nsc_init_neon(NSC_CONTEXT* context)
{
#if defined(NEON_ENABLED)

View File

@ -24,8 +24,6 @@
#include "../rfx_types.h"
#include "rfx_neon.h"
#define TAG FREERDP_TAG("codec.rfx.neon")
#if defined(WITH_NEON)
#if defined(_M_ARM64) || defined(_M_ARM)
#define NEON_ENABLED

View File

@ -38,14 +38,6 @@
#include "neon/nsc_neon.h"
#include <freerdp/log.h>
#define TAG FREERDP_TAG("codec.nsc")
#ifndef NSC_INIT_SIMD
#define NSC_INIT_SIMD(_nsc_context) \
do \
{ \
} while (0)
#endif
static BOOL nsc_decode(NSC_CONTEXT* WINPR_RESTRICT context)
{

View File

@ -37,8 +37,6 @@
#include "rfx_encode.h"
#define MINMAX(_v, _l, _h) ((_v) < (_l) ? (_l) : ((_v) > (_h) ? (_h) : (_v)))
static void rfx_encode_format_rgb(const BYTE* WINPR_RESTRICT rgb_data, int width, int height,
int rowstride, UINT32 pixel_format,
const BYTE* WINPR_RESTRICT palette, INT16* WINPR_RESTRICT r_buf,

View File

@ -19,13 +19,10 @@
#include <winpr/platform.h>
#include <freerdp/config.h>
#include <freerdp/log.h>
#include "../nsc_types.h"
#include "nsc_sse2.h"
#define TAG FREERDP_TAG("codec.nsc.sse2")
#if defined(WITH_SSE2)
#if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64) || defined(_M_IX86_AMD64)
#define SSE2_ENABLED

View File

@ -20,13 +20,10 @@
#include <winpr/platform.h>
#include <freerdp/config.h>
#include <freerdp/log.h>
#include "../rfx_types.h"
#include "rfx_sse2.h"
#define TAG FREERDP_TAG("codec.rfx.sse2")
#if defined(WITH_SSE2)
#if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64) || defined(_M_IX86_AMD64)
#define SSE2_ENABLED

View File

@ -29,8 +29,6 @@
#include <freerdp/log.h>
#include "xcrush.h"
#define TAG FREERDP_TAG("codec")
#pragma pack(push, 1)
typedef struct

View File

@ -26,8 +26,6 @@
#include "errinfo.h"
#define TAG FREERDP_TAG("core")
#define ERRBASE_DEFINE(_code) \
{ \
ERRBASE_##_code, "ERRBASE_" #_code, ERRBASE_##_code##_STRING, "" \

View File

@ -26,8 +26,6 @@
#include "errinfo.h"
#define TAG FREERDP_TAG("core")
#define ERRCONNECT_DEFINE(_code, category) \
{ \
ERRCONNECT_##_code, "ERRCONNECT_" #_code, ERRCONNECT_##_code##_STRING, category \

View File

@ -78,7 +78,7 @@
#define PKT_TYPE_CLOSE_CHANNEL_RESPONSE 0x11
/* HTTP tunnel auth fields present flags. */
#define HTTP_TUNNEL_AUTH_FIELD_SOH 0x1
// #define HTTP_TUNNEL_AUTH_FIELD_SOH 0x1
/* HTTP tunnel auth response fields present flags. */
#define HTTP_TUNNEL_AUTH_RESPONSE_FIELD_REDIR_FLAGS 0x1
@ -87,7 +87,7 @@
/* HTTP tunnel packet fields present flags. */
#define HTTP_TUNNEL_PACKET_FIELD_PAA_COOKIE 0x1
#define HTTP_TUNNEL_PACKET_FIELD_REAUTH 0x2
// #define HTTP_TUNNEL_PACKET_FIELD_REAUTH 0x2
/* HTTP tunnel response fields present flags. */
#define HTTP_TUNNEL_RESPONSE_FIELD_TUNNEL_ID 0x1
@ -1904,6 +1904,7 @@ static BOOL rdg_process_control_packet(rdpRdg* rdg, int type, size_t packetLengt
status = rdg_process_service_message(rdg, s);
break;
case PKT_TYPE_REAUTH_MESSAGE:
default:
status = rdg_process_unknown_packet(rdg, type);
break;

View File

@ -19,8 +19,6 @@
#include <freerdp/config.h>
#define WITH_DEBUG_HEARTBEAT
#include "heartbeat.h"
state_run_t rdp_recv_heartbeat_packet(rdpRdp* rdp, wStream* s)

View File

@ -40,8 +40,6 @@
#define INPUT_EVENT_MOUSEX 0x8002
#define INPUT_EVENT_MOUSEREL 0x8004
#define RDP_CLIENT_INPUT_PDU_HEADER_LENGTH 4
static void rdp_write_client_input_pdu_header(wStream* s, UINT16 number)
{
WINPR_ASSERT(s);

View File

@ -65,11 +65,11 @@ enum LicenseRequestType
ERROR_ALERT = 0xFF
};
#define LICENSE_PKT_CS_MASK \
(LICENSE_INFO | NEW_LICENSE_REQUEST | PLATFORM_CHALLENGE_RESPONSE | ERROR_ALERT)
#define LICENSE_PKT_SC_MASK \
(LICENSE_REQUEST | PLATFORM_CHALLENGE | NEW_LICENSE | UPGRADE_LICENSE | ERROR_ALERT)
#define LICENSE_PKT_MASK (LICENSE_PKT_CS_MASK | LICENSE_PKT_SC_MASK)
// #define LICENSE_PKT_CS_MASK \
// (LICENSE_INFO | NEW_LICENSE_REQUEST | PLATFORM_CHALLENGE_RESPONSE | ERROR_ALERT)
//#define LICENSE_PKT_SC_MASK \
// (LICENSE_REQUEST | PLATFORM_CHALLENGE | NEW_LICENSE | UPGRADE_LICENSE | ERROR_ALERT)
//#define LICENSE_PKT_MASK (LICENSE_PKT_CS_MASK | LICENSE_PKT_SC_MASK)
#define LICENSE_PREAMBLE_LENGTH 4
@ -82,15 +82,15 @@ enum LicenseRequestType
#define MAC_SALT_KEY_LENGTH 16
#define LICENSING_ENCRYPTION_KEY_LENGTH 16
#define HWID_PLATFORM_ID_LENGTH 4
#define HWID_UNIQUE_DATA_LENGTH 16
// #define HWID_UNIQUE_DATA_LENGTH 16
#define HWID_LENGTH 20
#define LICENSING_PADDING_SIZE 8
// #define LICENSING_PADDING_SIZE 8
/* Preamble Flags */
#define PREAMBLE_VERSION_2_0 0x02
// #define PREAMBLE_VERSION_2_0 0x02
#define PREAMBLE_VERSION_3_0 0x03
#define LicenseProtocolVersionMask 0x0F
// #define LicenseProtocolVersionMask 0x0F
#define EXTENDED_ERROR_MSG_SUPPORTED 0x80
/** @brief binary Blob Types */

View File

@ -54,7 +54,7 @@
#define TAG FREERDP_TAG("core.nla")
#define SERVER_KEY "Software\\" FREERDP_VENDOR_STRING "\\" FREERDP_PRODUCT_STRING "\\Server"
// #define SERVER_KEY "Software\\" FREERDP_VENDOR_STRING "\\" FREERDP_PRODUCT_STRING "\\Server"
#define NLA_AUTH_PKG NEGO_SSP_NAME
@ -107,8 +107,6 @@ typedef enum
*
*/
#define NLA_PKG_NAME CREDSSP_AUTH_PKG_SPNEGO
struct rdp_nla
{
BOOL server;

View File

@ -58,8 +58,8 @@
#define TAG FREERDP_TAG("core")
#define CERTIFICATE_TAG FREERDP_TAG("core.certificate")
#ifdef WITH_DEBUG_CERTIFICATE
#define CERTIFICATE_TAG FREERDP_TAG("core.certificate")
#define DEBUG_CERTIFICATE(...) WLog_DBG(TAG, __VA_ARGS__)
#else
#define DEBUG_CERTIFICATE(...) \

View File

@ -34,9 +34,6 @@
#include "certificate.h"
#include <freerdp/log.h>
#define TAG FREERDP_TAG("crypto")
struct rdp_certificate_data
{
char* hostname;

View File

@ -38,7 +38,6 @@
#include <freerdp/crypto/crypto.h>
#include <freerdp/crypto/certificate_store.h>
#include <freerdp/log.h>
#define TAG FREERDP_TAG("crypto")
struct rdp_certificate_store
{

View File

@ -37,11 +37,11 @@
#define VGIDS_EFID_MASTER 0xA000
#define VGIDS_EFID_COMMON 0xA010
#define VGIDS_EFID_CARDCF VGIDS_EFID_COMMON
#define VGIDS_EFID_CARDAPPS VGIDS_EFID_COMMON
#define VGIDS_EFID_CMAPFILE VGIDS_EFID_COMMON
// #define VGIDS_EFID_CARDCF VGIDS_EFID_COMMON
// #define VGIDS_EFID_CARDAPPS VGIDS_EFID_COMMON
// #define VGIDS_EFID_CMAPFILE VGIDS_EFID_COMMON
#define VGIDS_EFID_CARDID 0xA012
#define VGIDS_EFID_KXC00 VGIDS_EFID_COMMON
// #define VGIDS_EFID_KXC00 VGIDS_EFID_COMMON
#define VGIDS_EFID_CURRENTDF 0x3FFF
#define VGIDS_DO_FILESYSTEMTABLE 0xDF1F
@ -58,23 +58,23 @@
#define VGIDS_DEFAULT_RETRY_COUNTER 3
#define VGIDS_KEY_TYPE_KEYEXCHANGE 0x9A
#define VGIDS_KEY_TYPE_SIGNATURE 0x9C
// #define VGIDS_KEY_TYPE_SIGNATURE 0x9C
#define VGIDS_ALGID_RSA_1024 0x06
#define VGIDS_ALGID_RSA_2048 0x07
#define VGIDS_ALGID_RSA_3072 0x08
#define VGIDS_ALGID_RSA_4096 0x09
#define VGIDS_SE_CRT_AUTH 0xA4
// #define VGIDS_SE_CRT_AUTH 0xA4
#define VGIDS_SE_CRT_SIGN 0xB6
#define VGIDS_SE_CRT_CONF 0xB8
#define VGIDS_SE_ALGOID_CT_PAD_PKCS1 0x40
#define VGIDS_SE_ALGOID_CT_PAD_OAEP 0x80
#define VGIDS_SE_ALGOID_CT_RSA_1024 0x06
#define VGIDS_SE_ALGOID_CT_RSA_2048 0x07
#define VGIDS_SE_ALGOID_CT_RSA_3072 0x08
#define VGIDS_SE_ALGOID_CT_RSA_4096 0x09
// #define VGIDS_SE_ALGOID_CT_RSA_1024 0x06
// #define VGIDS_SE_ALGOID_CT_RSA_2048 0x07
// #define VGIDS_SE_ALGOID_CT_RSA_3072 0x08
// #define VGIDS_SE_ALGOID_CT_RSA_4096 0x09
#define VGIDS_SE_ALGOID_DST_PAD_PKCS1 0x40
#define VGIDS_SE_ALGOID_DST_RSA_1024 0x06

View File

@ -34,8 +34,6 @@
#include "brush.h"
#include "clipping.h"
#define TAG FREERDP_TAG("gdi.brush")
const char* gdi_rop_to_string(UINT32 code)
{
switch (code)

View File

@ -27,8 +27,6 @@
#include <freerdp/gdi/video.h>
#include <freerdp/gdi/region.h>
#define TAG FREERDP_TAG("video")
void gdi_video_geometry_init(rdpGdi* gdi, GeometryClientContext* geom)
{
WINPR_ASSERT(gdi);

View File

@ -34,7 +34,10 @@
#include <freerdp/locale/keyboard.h>
#include <freerdp/log.h>
#if defined(WITH_KEYBOARD_LAYOUT_FROM_FILE)
#define TAG FREERDP_TAG("locale.keyboard.layouts")
#endif
// #define DUMP_LAYOUTS_TO_JSON

View File

@ -28,9 +28,6 @@
#include "prim_alphaComp.h"
#define ALPHA(_k_) (((_k_)&0xFF000000U) >> 24)
#define RED(_k_) (((_k_)&0x00FF0000U) >> 16)
#define GRN(_k_) (((_k_)&0x0000FF00U) >> 8)
#define BLU(_k_) (((_k_)&0x000000FFU))
/* ------------------------------------------------------------------------- */
static pstatus_t general_alphaComp_argb(const BYTE* pSrc1, UINT32 src1Step, const BYTE* pSrc2,

View File

@ -26,8 +26,6 @@
#include <freerdp/codec/color.h>
#define TAG FREERDP_TAG("primitives.copy")
static primitives_t* generic = NULL;
/* ------------------------------------------------------------------------- */

View File

@ -28,9 +28,9 @@
#include <freerdp/codec/color.h>
#if defined(SSE2_ENABLED)
#define TAG FREERDP_TAG("primitives.copy")
#if defined(SSE2_ENABLED)
#include <emmintrin.h>
#include <immintrin.h>

View File

@ -28,9 +28,9 @@
#include <freerdp/codec/color.h>
#if defined(SSE2_ENABLED)
#define TAG FREERDP_TAG("primitives.copy")
#if defined(SSE2_ENABLED)
#include <emmintrin.h>
#include <immintrin.h>

View File

@ -28,9 +28,6 @@
#include <winpr/file.h>
#include <winpr/crt.h>
#include <winpr/sysinfo.h>
#include <freerdp/log.h>
#define TAG FREERDP_TAG("utils")
#include <freerdp/types.h>
#include <freerdp/utils/pcap.h>

View File

@ -27,7 +27,6 @@
#include <freerdp/channels/rdpdr.h>
#include <freerdp/log.h>
#define TAG FREERDP_TAG("utils.scard")
LONG scard_log_status_error(const char* tag, const char* what, LONG status)
{

View File

@ -28,9 +28,9 @@
#include <winpr/crt.h>
#include <freerdp/log.h>
#ifdef WITH_DEBUG_RINGBUFFER
#define TAG FREERDP_TAG("utils.ringbuffer")
#ifdef WITH_DEBUG_RINGBUFFER
#define DEBUG_RINGBUFFER(...) WLog_DBG(TAG, __VA_ARGS__)
#else
#define DEBUG_RINGBUFFER(...) \

View File

@ -47,7 +47,6 @@
#if defined(WITH_SMARTCARD_EMULATE)
#include <freerdp/emulate/scard/smartcard_emulate.h>
#define str(x) #x
#define wrap(ctx, fkt, ...) \
ctx->useEmulatedCard ? Emulate_##fkt(ctx->emulation, ##__VA_ARGS__) \
: ctx->pWinSCardApi->pfn##fkt(__VA_ARGS__)

View File

@ -29,8 +29,6 @@
#include <freerdp/server/audin.h>
#endif
#define TAG SERVER_TAG("shadow")
#if defined(CHANNEL_AUDIN_SERVER)
static UINT AudinServerData(audin_server_context* audin, const SNDIN_DATA* data)

View File

@ -27,8 +27,6 @@
#include "shadow_capture.h"
#define TAG SERVER_TAG("shadow")
int shadow_capture_align_clip_rect(RECTANGLE_16* rect, const RECTANGLE_16* clip)
{
int dx = 0;

View File

@ -23,8 +23,6 @@
#include "shadow_rdpgfx.h"
#define TAG SERVER_TAG("shadow")
int shadow_client_rdpgfx_init(rdpShadowClient* client)
{
WINPR_ASSERT(client);