summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/util.c b/src/util.c
index baff6c8..5671fad 100644
--- a/src/util.c
+++ b/src/util.c
@@ -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));