Skip to content

Commit

Permalink
Warning in pre.l
Browse files Browse the repository at this point in the history
In `pre.l` we see warnings like:
```
pre.l(2850): warning C4267: 'initializing': conversion from 'size_t' to 'uint32_t', possible loss of data
pre.l(2852): warning C4242: 'argument': conversion from 'int' to 'char', possible loss of data
```
preventing this by means of casts and the fact that EOF should not be unput
  • Loading branch information
albert-github committed Apr 8, 2024
1 parent 8d619a2 commit 2353b11
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pre.l
Original file line number Diff line number Diff line change
Expand Up @@ -2846,9 +2846,9 @@ static void addSeparatorsIfNeeded(yyscan_t yyscanner,const QCString &expr,QCStri
restExpr=restExpr.stripWhiteSpace();
if (restExpr.isEmpty()) // peek ahead in the stream for non-whitespace
{
uint32_t j=resultExpr.length();
uint32_t j=(uint32_t)resultExpr.length();
while ((ccNext=getNextChar(yyscanner,resultExpr,nullptr,j))!=EOF && ccNext==' ') { }
unputChar(yyscanner,resultExpr,nullptr,j,ccNext);
if (ccNext != EOF) unputChar(yyscanner,resultExpr,nullptr,j,(char)ccNext);
}
else // take first char from remainder
{
Expand Down

0 comments on commit 2353b11

Please sign in to comment.