diff --git a/libfreerdp-core/mcs.c b/libfreerdp-core/mcs.c index 8d2bef00a..af5f15b72 100644 --- a/libfreerdp-core/mcs.c +++ b/libfreerdp-core/mcs.c @@ -152,10 +152,11 @@ * */ -uint8 callingDomainSelector[1] = "\x01"; -uint8 calledDomainSelector[1] = "\x01"; +static const uint8 callingDomainSelector[1] = "\x01"; +static const uint8 calledDomainSelector[1] = "\x01"; -uint8 mcs_result_enumerated[16][32] = +/* +static const char* const mcs_result_enumerated[] = { "rt-successful", "rt-domain-merging", @@ -174,6 +175,7 @@ uint8 mcs_result_enumerated[16][32] = "rt-unspecified-failure", "rt-user-rejected" }; +*/ /** * Read a DomainMCSPDU header. diff --git a/libfreerdp-core/nego.c b/libfreerdp-core/nego.c index 5c6f964fe..48b8db9b0 100644 --- a/libfreerdp-core/nego.c +++ b/libfreerdp-core/nego.c @@ -27,7 +27,7 @@ #include "nego.h" -char NEGO_STATE_STRINGS[6][25] = +static const char* const NEGO_STATE_STRINGS[] = { "NEGO_STATE_INITIAL", "NEGO_STATE_NLA", @@ -37,7 +37,7 @@ char NEGO_STATE_STRINGS[6][25] = "NEGO_STATE_FINAL" }; -char PROTOCOL_SECURITY_STRINGS[3][4] = +static const char PROTOCOL_SECURITY_STRINGS[3][4] = { "RDP", "TLS", diff --git a/libfreerdp-core/nego.h b/libfreerdp-core/nego.h index 005d3fb2e..08c3fb0be 100644 --- a/libfreerdp-core/nego.h +++ b/libfreerdp-core/nego.h @@ -68,9 +68,6 @@ enum RDP_NEG_MSG #define EXTENDED_CLIENT_DATA_SUPPORTED 0x01 -extern char NEGO_STATE_STRINGS[6][25]; -extern char PROTOCOL_SECURITY_STRINGS[3][4]; - struct rdp_nego { int port; diff --git a/libfreerdp-core/orders.c b/libfreerdp-core/orders.c index 0e9d37563..ea39eca3e 100644 --- a/libfreerdp-core/orders.c +++ b/libfreerdp-core/orders.c @@ -24,7 +24,9 @@ #include "orders.h" -uint8 PRIMARY_DRAWING_ORDER_STRINGS[][20] = +#ifdef WITH_DEBUG_ORDERS + +static const char* const PRIMARY_DRAWING_ORDER_STRINGS[] = { "DstBlt", "PatBlt", @@ -55,7 +57,7 @@ uint8 PRIMARY_DRAWING_ORDER_STRINGS[][20] = #define PRIMARY_DRAWING_ORDER_COUNT (sizeof(PRIMARY_DRAWING_ORDER_STRINGS) / sizeof(PRIMARY_DRAWING_ORDER_STRINGS[0])) -uint8 SECONDARY_DRAWING_ORDER_STRINGS[][32] = +static const char* const SECONDARY_DRAWING_ORDER_STRINGS[] = { "Cache Bitmap", "Cache Color Table", @@ -70,7 +72,7 @@ uint8 SECONDARY_DRAWING_ORDER_STRINGS[][32] = #define SECONDARY_DRAWING_ORDER_COUNT (sizeof(SECONDARY_DRAWING_ORDER_STRINGS) / sizeof(SECONDARY_DRAWING_ORDER_STRINGS[0])) -uint8 ALTSEC_DRAWING_ORDER_STRINGS[][32] = +static const char* const ALTSEC_DRAWING_ORDER_STRINGS[] = { "Switch Surface", "Create Offscreen Bitmap", @@ -90,7 +92,9 @@ uint8 ALTSEC_DRAWING_ORDER_STRINGS[][32] = #define ALTSEC_DRAWING_ORDER_COUNT (sizeof(ALTSEC_DRAWING_ORDER_STRINGS) / sizeof(ALTSEC_DRAWING_ORDER_STRINGS[0])) -uint8 PRIMARY_DRAWING_ORDER_FIELD_BYTES[] = +#endif /* WITH_DEBUG_ORDERS */ + +static const uint8 PRIMARY_DRAWING_ORDER_FIELD_BYTES[] = { DSTBLT_ORDER_FIELD_BYTES, PATBLT_ORDER_FIELD_BYTES, @@ -119,17 +123,17 @@ uint8 PRIMARY_DRAWING_ORDER_FIELD_BYTES[] = GLYPH_INDEX_ORDER_FIELD_BYTES }; -uint8 CBR2_BPP[] = +static const uint8 CBR2_BPP[] = { 0, 0, 0, 8, 16, 24, 32 }; -uint8 CBR23_BPP[] = +static const uint8 CBR23_BPP[] = { 0, 0, 0, 8, 16, 24, 32 }; -uint8 BMF_BPP[] = +static const uint8 BMF_BPP[] = { 0, 1, 0, 8, 16, 24, 32 }; diff --git a/libfreerdp-core/settings.c b/libfreerdp-core/settings.c index 0bd950c16..f977b5081 100644 --- a/libfreerdp-core/settings.c +++ b/libfreerdp-core/settings.c @@ -27,7 +27,7 @@ #include -static char client_dll[] = "C:\\Windows\\System32\\mstscax.dll"; +static const char client_dll[] = "C:\\Windows\\System32\\mstscax.dll"; rdpSettings* settings_new(void* instance) { diff --git a/libfreerdp-core/update.c b/libfreerdp-core/update.c index cbce2671a..86e2288f7 100644 --- a/libfreerdp-core/update.c +++ b/libfreerdp-core/update.c @@ -22,13 +22,15 @@ #include #include -uint8 UPDATE_TYPE_STRINGS[][32] = +/* +static const char* const UPDATE_TYPE_STRINGS[] = { "Orders", "Bitmap", "Palette", "Synchronize" }; +*/ void update_recv_orders(rdpUpdate* update, STREAM* s) {