diff options
Diffstat (limited to 'src/twm.c')
-rw-r--r-- | src/twm.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -359,7 +359,8 @@ main(int argc, char *argv[]) InfoLines = 0; /* for simplicity, always allocate NumScreens ScreenInfo struct pointers */ - ScreenList = calloc((size_t) NumScreens, sizeof(ScreenInfo *)); + ScreenList = (ScreenInfo **) + calloc((size_t) NumScreens, sizeof(ScreenInfo *)); if (ScreenList == NULL) { twmError("Unable to allocate memory for screen list, exiting"); } @@ -394,7 +395,7 @@ main(int argc, char *argv[]) numManaged++; /* Note: ScreenInfo struct is calloc'ed to initialize to zero. */ - Scr = ScreenList[scrnum] = calloc(1, sizeof(ScreenInfo)); + Scr = ScreenList[scrnum] = (ScreenInfo *) calloc(1, sizeof(ScreenInfo)); if (Scr == NULL) { twmWarning ("unable to allocate memory for ScreenInfo structure for screen %d.", @@ -442,7 +443,8 @@ main(int argc, char *argv[]) XSaveContext(dpy, Scr->Root, ScreenContext, (XPointer) Scr); Scr->TwmRoot.cmaps.number_cwins = 1; - Scr->TwmRoot.cmaps.cwins = malloc(sizeof(ColormapWindow *)); + Scr->TwmRoot.cmaps.cwins = (ColormapWindow **) + malloc(sizeof(ColormapWindow *)); Scr->TwmRoot.cmaps.cwins[0] = CreateColormapWindow(Scr->Root, True, False); Scr->TwmRoot.cmaps.cwins[0]->visibility = VisibilityPartiallyObscured; |