diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2019-06-01 19:27:15 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2019-06-01 19:27:15 -0700 |
commit | 3a2473affe1e15d6e8d252db7ec5e22fd1683978 (patch) | |
tree | 023b0349e60706cf11213e67ce09c99c975c5cd8 /Bitmap.c | |
parent | 6dcc9c8064baeb2f9d853309123cd9736809a4fd (diff) |
Use _CONST_X_STRING to make libXt declare String as const char *
Clears 169 out of 240 -Wdiscarded-qualifiers warnings from gcc 7.3
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'Bitmap.c')
-rw-r--r-- | Bitmap.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -648,7 +648,7 @@ BWPutImage(BitmapWidget w, Display *display, Drawable drawable, GC gc, } #endif -static String +static char * StripFilename(_Xconst _XtString filename) { const char *begin = strrchr(filename, '/'); @@ -688,7 +688,7 @@ XmuWriteBitmapDataToFile(_Xconst _XtString filename, file = fopen(filename, "w+"); if (file) { - String new_basename; + char *new_basename; if (!basename || !strcmp(basename, "") || !strcmp(basename, "-")) basename = new_basename = StripFilename(filename); @@ -1227,8 +1227,8 @@ BWWriteFile(Widget w, _Xconst _XtString filename, _Xconst _XtString basename) return status; } -String -BWGetFilename(Widget w, String *str) +_XtString +BWGetFilename(Widget w, _XtString *str) { BitmapWidget BW = (BitmapWidget) w; @@ -1237,11 +1237,11 @@ BWGetFilename(Widget w, String *str) return *str; } -String -BWGetFilepath(Widget w, String *str) +_XtString +BWGetFilepath(Widget w, _XtString *str) { BitmapWidget BW = (BitmapWidget) w; - String end; + _XtString end; *str = XtNewString(BW->bitmap.filename); assert(*str); @@ -1257,8 +1257,8 @@ BWGetFilepath(Widget w, String *str) } -String -BWGetBasename(Widget w, String *str) +_XtString +BWGetBasename(Widget w, _XtString *str) { BitmapWidget BW = (BitmapWidget) w; |