summaryrefslogtreecommitdiff
path: root/ULabel.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-04-03 15:34:31 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-04-03 15:34:31 -0700
commit954fc5687b9805201c425fd3139acb6d19bd9bd5 (patch)
tree8145fed234d1879178f2dec648c132e402f223b2 /ULabel.c
parentb08c43c680e4ad3092893bc7f3eb5f98e67648af (diff)
const cleanup
Clears up 32 out of 49 -Wdiscarded-qualifiers warnings from gcc Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'ULabel.c')
-rw-r--r--ULabel.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ULabel.c b/ULabel.c
index bac4992..f7d7a38 100644
--- a/ULabel.c
+++ b/ULabel.c
@@ -177,9 +177,9 @@ static XChar2b *buf2b;
static int buf2blen = 0;
static void _XawLabelDrawUCS(Display *dpy, Drawable d, GC gc,
- int x, int y, char *str, int n)
+ int x, int y, const char *str, int n)
{
- char *ep;
+ const char *ep;
unsigned short codepoint;
XChar2b *ptr;
@@ -214,11 +214,11 @@ static void _XawLabelDrawUCS(Display *dpy, Drawable d, GC gc,
static int _XawLabelWidthUCS(
XFontStruct *fs,
- char *str,
+ const char *str,
int n
)
{
- char *ep;
+ const char *ep;
unsigned short codepoint;
XChar2b *ptr;
@@ -287,7 +287,7 @@ static void SetTextWidthAndHeight(UCSLabelWidget lw)
lw->label.label_width = 0;
}
else if ((nl = index(lw->label.label, '\n')) != NULL) {
- char *label;
+ const char *label;
lw->label.label_len = MULTI_LINE_LABEL;
lw->label.label_width = 0;
for (label = lw->label.label; nl != NULL; nl = index(label, '\n')) {
@@ -320,7 +320,7 @@ static void SetTextWidthAndHeight(UCSLabelWidget lw)
lw->label.label_width = 0;
}
else if ((nl = index(lw->label.label, '\n')) != NULL) {
- char *label;
+ const char *label;
lw->label.label_len = MULTI_LINE_LABEL;
lw->label.label_width = 0;
for (label = lw->label.label; nl != NULL; nl = index(label, '\n')) {
@@ -520,7 +520,7 @@ static void Redisplay(Widget gw, XEvent *event, Region region)
if (w->label.pixmap == None) {
int len = w->label.label_len;
- char *label = w->label.label;
+ const char *label = w->label.label;
Position y = w->label.label_y + w->label.font->max_bounds.ascent;
Position ksy = w->label.label_y;
@@ -756,7 +756,7 @@ static void Destroy(Widget w)
UCSLabelWidget lw = (UCSLabelWidget)w;
if ( lw->label.label != lw->core.name )
- XtFree( lw->label.label );
+ XtFree( (char *) lw->label.label );
XtReleaseGC( w, lw->label.normal_GC );
XtReleaseGC( w, lw->label.gray_GC);
XmuReleaseStippledPixmap( XtScreen(w), lw->label.stipple );