From: Christophe CURIS <[email protected]>

The function contained an internal statement that would have
discarded the const attribute, but as this statement is actually
useless it have been simply removed.

Signed-off-by: Christophe CURIS <[email protected]>
---
 src/misc.c |    4 ++--
 src/misc.h |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/misc.c b/src/misc.c
index 6b3336d..0765612 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -256,7 +256,7 @@ void SlideWindows(Window *wins[], int n, int from_x, int 
from_y, int to_x, int t
        eatExpose();
 }
 
-char *ShrinkString(WMFont * font, char *string, int width)
+char *ShrinkString(WMFont * font, const char *string, int width)
 {
        int w, w1 = 0;
        int p;
@@ -296,7 +296,7 @@ char *ShrinkString(WMFont * font, char *string, int width)
        }
        strcat(text, "...");
        width -= WMWidthOfString(font, "...", 3);
-       pos = string;
+
        p1 = 0;
        p2 = p;
        t = (p2 - p1) / 2;
diff --git a/src/misc.h b/src/misc.h
index 39b4d32..7f199d8 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -35,7 +35,7 @@ void SlideWindows(Window *wins[], int n, int from_x, int 
from_y, int to_x, int t
 void ParseWindowName(WMPropList * value, char **winstance, char **wclass, char 
*where);
 void SendHelperMessage(WScreen * scr, char type, int workspace, char *msg);
 
-char *ShrinkString(WMFont * font, char *string, int width);
+char *ShrinkString(WMFont * font, const char *string, int width);
 char *FindImage(char *paths, char *file);
 char *ExpandOptions(WScreen * scr, char *cmdline);
 char *GetShortcutString(char *text);
-- 
1.7.10.4


-- 
To unsubscribe, send mail to [email protected].

Reply via email to