summaryrefslogtreecommitdiff
path: root/src/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/parse.c b/src/parse.c
index 787e1b1..044e02c 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -179,7 +179,7 @@ int ParseTwmrc (char *filename)
if (!filename) {
home = getenv ("HOME");
if (home) {
- homelen = strlen (home);
+ homelen = (int)strlen (home);
cp = tmpfilename;
(void) snprintf (tmpfilename, sizeof(tmpfilename),
"%s/.twmrc.%d", home, Scr->screen);
@@ -246,7 +246,7 @@ static int twmFileInput(void)
return 0;
ptr = 0;
- len = strlen((char *) buff);
+ len = (int)strlen((char *) buff);
}
return ((int)buff[ptr++]);
}
@@ -261,7 +261,7 @@ static int twmStringListInput(void)
if (currentString) {
unsigned int c = (unsigned int) *currentString++;
- if (c) return c; /* if non-nul char */
+ if (c) return (int)c; /* if non-nul char */
currentString = *++stringListSource; /* advance to next bol */
return '\n'; /* but say that we hit last eol */
}
@@ -276,7 +276,7 @@ static int twmStringListInput(void)
*/
void twmUnput (int c)
{
- if (overflowlen < sizeof overflowbuff) {
+ if ((size_t)overflowlen < sizeof overflowbuff) {
overflowbuff[overflowlen++] = (unsigned char) c;
} else {
twmrc_error_prefix ();
@@ -738,7 +738,7 @@ int do_string_keyword (int keyword, char *s)
fprintf (stderr,
"ignoring invalid UsePPosition argument \"%s\"\n", s);
} else {
- Scr->UsePPosition = ppos;
+ Scr->UsePPosition = (short)ppos;
}
return 1;
}
@@ -772,7 +772,7 @@ int do_string_keyword (int keyword, char *s)
return 1;
case kws_MaxWindowSize:
- JunkMask = XParseGeometry (s, &JunkX, &JunkY, &JunkWidth, &JunkHeight);
+ JunkMask = (unsigned)XParseGeometry (s, &JunkX, &JunkY, &JunkWidth, &JunkHeight);
if ((JunkMask & (WidthValue | HeightValue)) !=
(WidthValue | HeightValue)) {
twmrc_error_prefix();
@@ -784,8 +784,8 @@ int do_string_keyword (int keyword, char *s)
fprintf (stderr, "MaxWindowSize \"%s\" must be positive\n", s);
return 0;
}
- Scr->MaxWindowWidth = JunkWidth;
- Scr->MaxWindowHeight = JunkHeight;
+ Scr->MaxWindowWidth = (int)JunkWidth;
+ Scr->MaxWindowHeight = (int)JunkHeight;
return 1;
}
@@ -801,11 +801,11 @@ int do_number_keyword (int keyword, int num)
return 1;
case kwn_MoveDelta:
- Scr->MoveDelta = num;
+ Scr->MoveDelta = (short)num;
return 1;
case kwn_XorValue:
- if (Scr->FirstTime) Scr->XORvalue = num;
+ if (Scr->FirstTime) Scr->XORvalue = (unsigned long)num;
return 1;
case kwn_FramePadding:
@@ -959,7 +959,7 @@ put_pixel_on_root(Pixel pixel)
&retFormat, &nPixels, &retAfter,
&retProp) == Success) {
pixelProp = (Pixel *) retProp;
- for (i = 0; i < nPixels; i++)
+ for (i = 0; (unsigned long)i < nPixels; i++)
if (pixel == pixelProp[i])
addPixel = 0;
}