From c10de6efe50fcd7be57e79274889d11e6845f82e Mon Sep 17 00:00:00 2001 From: Walter Harms Date: Fri, 7 Apr 2023 13:09:26 +0200 Subject: fix initialization discards const MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FIX warnings like: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] {"debug", "Debug", XtRBoolean, sizeof(Boolean), --- editres.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/editres.c b/editres.c index f565196..b449bf8 100644 --- a/editres.c +++ b/editres.c @@ -49,7 +49,7 @@ String res_labels[NUM_RES_LABELS]; int global_effective_protocol_version = CURRENT_PROTOCOL_VERSION; /* toolkit type of client whose "resources" we are currently editing */ -String global_effective_toolkit = "xt"; +const char *global_effective_toolkit = "xt"; int global_error_code; unsigned long global_serial_num; @@ -74,15 +74,15 @@ static String fallback_resources[] = { #define Offset(field) (XtOffsetOf(AppResources, field)) static XtResource editres_resources[] = { - {"debug", "Debug", XtRBoolean, sizeof(Boolean), + {(String)"debug", (String)"Debug", XtRBoolean, sizeof(Boolean), Offset(debug), XtRImmediate, (XtPointer) FALSE}, - {"numFlashes", "NumFlashes", XtRInt, sizeof(int), + {(String)"numFlashes", (String)"NumFlashes", XtRInt, sizeof(int), Offset(num_flashes), XtRImmediate, (XtPointer) NUM_FLASHES}, - {"flashTime", "FlashTime", XtRInt, sizeof(int), + {(String)"flashTime", (String)"FlashTime", XtRInt, sizeof(int), Offset(flash_time), XtRImmediate, (XtPointer) FLASH_TIME}, - {"flashColor", XtCForeground, XtRPixel, sizeof(Pixel), + {(String)"flashColor", XtCForeground, XtRPixel, sizeof(Pixel), Offset(flash_color), XtRImmediate, (XtPointer) XtDefaultForeground}, - {"saveResourceFile", "SaveResourcesFile", XtRString, sizeof(String), + {(String)"saveResourceFile", (String)"SaveResourcesFile", XtRString, sizeof(String), Offset(save_resources_file), XtRString, (XtPointer) ""}, }; -- cgit v1.2.3