diff options
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -259,7 +259,7 @@ ExpandFilename(const char *name) if (name[0] != '~') return strdup(name); - newname = malloc((size_t) HomeLen + strlen(name) + 2); + newname = (char *) malloc((size_t) HomeLen + strlen(name) + 2); if (!newname) { twmWarning("unable to allocate %lu bytes to expand filename %s/%s", (unsigned long) HomeLen + (unsigned long) strlen(name) + 2, @@ -358,7 +358,8 @@ FindBitmap(const char *name, unsigned *widthp, unsigned *heightp) /* * Attempt to find icon in old IconDirectory (now obsolete) */ - bigname = malloc(strlen(name) + strlen(Scr->IconDirectory) + 2); + bigname = (char *) + malloc(strlen(name) + strlen(Scr->IconDirectory) + 2); if (!bigname) { twmWarning("unable to allocate memory for \"%s/%s\"", Scr->IconDirectory, name); @@ -399,7 +400,7 @@ InsertRGBColormap(Atom a, XStandardColormap *maps, int nmaps, Bool replace) } if (!sc) { /* no existing, allocate new */ - sc = malloc(sizeof(StdCmap)); + sc = (StdCmap *) malloc(sizeof(StdCmap)); if (!sc) { twmWarning("unable to allocate %lu bytes for StdCmap", (unsigned long) sizeof(StdCmap)); |