Skip to content

Commit

Permalink
Added casts to quite compiler.
Browse files Browse the repository at this point in the history
git-svn-id: https://ctags.svn.sourceforge.net/svnroot/ctags/trunk@113 c5d04d22-be80-434c-894e-aa346cc9e8e8
  • Loading branch information
Darren Hiebert committed Feb 19, 2002
1 parent 2058a86 commit 3b8a8c0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
19 changes: 9 additions & 10 deletions beta.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ static void findBetaTags (void)
last = vStringLength (line) - 1;
first = 0;
/* skip white space at start and end of line */
while (last && isspace (vStringChar (line, last))) last--;
while (first < last && isspace (vStringChar (line, first))) first++;
while (last && isspace ((int) vStringChar (line, last))) last--;
while (first < last && isspace ((int) vStringChar (line, first))) first++;
/* if line still has a reasonable length and ... */
if (last - first > 4 &&
(vStringChar (line, first) == '-' &&
Expand All @@ -125,9 +125,9 @@ static void findBetaTags (void)
last -= 2;
first += 2;
while (last && vStringChar (line, last) != ':') last--;
while (last && (isspace (vStringChar (line, last-1)))) last--;
while (last && (isspace ((int) vStringChar (line, last-1)))) last--;
while (first < last &&
(isspace (vStringChar (line, first)) ||
(isspace ((int) vStringChar (line, first)) ||
vStringChar (line, first) == '-'))
first++;
/* If there's anything left it is a fragment title */
Expand Down Expand Up @@ -185,23 +185,22 @@ static void findBetaTags (void)
char c2;
pos += 2; /* skip past << */
/* skip past space before SLOT */
while (pos < len &&
isspace (vStringChar (line, pos)))
while (pos < len && isspace ((int) vStringChar (line, pos)))
pos++;
/* skip past SLOT */
if (pos+4 <= len &&
!strncasecmp (vStringValue(line) + pos, "SLOT", (size_t)4))
pos += 4;
/* skip past space after SLOT */
while (pos < len &&
isspace (vStringChar (line, pos)))
isspace ((int) vStringChar (line, pos)))
pos++;
eoname = pos;
/* skip to end of name */
while (eoname < len &&
(c2 = vStringChar (line, eoname)) != '>' &&
c2 != ':' &&
!isspace (c2))
!isspace ((int) c2))
eoname++;
if (eoname < len)
{
Expand Down Expand Up @@ -238,7 +237,7 @@ static void findBetaTags (void)
/* Found pattern name, get start and end */
int eoname = pos;
int soname;
while (eoname && isspace (vStringChar (line, eoname-1)))
while (eoname && isspace ((int) vStringChar (line, eoname-1)))
eoname--;
foundanothername:
/* terminate right after name */
Expand All @@ -254,7 +253,7 @@ static void findBetaTags (void)
makeBetaTag (vStringValue (line) + soname, K_PATTERN);
/* scan back past white space */
while (soname &&
isspace (vStringChar (line, soname-1)))
isspace ((int) vStringChar (line, soname-1)))
soname--;
if (soname && vStringChar (line, soname-1) == ',')
{
Expand Down
4 changes: 2 additions & 2 deletions lua.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ static void extract_name (const char *begin, const char *end, vString *name)
{
const char *cp;

while (isspace (*begin))
while (isspace ((int) *begin))
begin++;
while (isspace (*end))
while (isspace ((int) *end))
end--;
if (begin < end)
{
Expand Down
4 changes: 2 additions & 2 deletions parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ static vString* determineInterpreter (const char* const cmd)
do
{
vStringClear (interpreter);
for ( ; isspace (*p) ; ++p)
for ( ; isspace ((int) *p) ; ++p)
; /* no-op */
for ( ; *p != '\0' && ! isspace (*p) ; ++p)
for ( ; *p != '\0' && ! isspace ((int) *p) ; ++p)
vStringPut (interpreter, (int) *p);
vStringTerminate (interpreter);
} while (strcmp (vStringValue (interpreter), "env") == 0);
Expand Down

0 comments on commit 3b8a8c0

Please sign in to comment.