diff options
author | Walter Harms <xt4ever@web.de> | 2023-04-07 13:09:26 +0200 |
---|---|---|
committer | Walter Harms <xt4ever@web.de> | 2023-04-07 13:09:26 +0200 |
commit | c10de6efe50fcd7be57e79274889d11e6845f82e (patch) | |
tree | 8b77a50519f5caddb605039e404ceec2e12076cd /editres.c | |
parent | 316df270e14ce13a3a631cdfd383a5a367fe14b0 (diff) |
fix initialization discards const
FIX warnings like:
initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
{"debug", "Debug", XtRBoolean, sizeof(Boolean),
Diffstat (limited to 'editres.c')
-rw-r--r-- | editres.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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) ""}, }; |