summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Sobisch <simonsobisch@web.de>2021-06-22 20:27:20 +0200
committerGitHub <noreply@github.com>2021-06-22 20:27:20 +0200
commitb198864a75f73f1a125a048919fa849710d10fe0 (patch)
treedbbdeae97f1e6eb4f9bd151694dde13fa97299c9 /src
parent7b073fdda2242a8e4a0f70244c0ae83d34f099b1 (diff)
downloadflex-git-b198864a75f73f1a125a048919fa849710d10fe0.tar.gz
fix compile warning originating in cpp skeleton
`gcount()` is of type `streamsize` which has a system-dependent size with at least `int`. Because of the `int max_size` limit no bigger value will be returned, the explicit cast fixes warnings from compilers/static analyzers.
Diffstat (limited to 'src')
-rw-r--r--src/cpp-flex.skl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cpp-flex.skl b/src/cpp-flex.skl
index 1db0446..1c62e3d 100644
--- a/src/cpp-flex.skl
+++ b/src/cpp-flex.skl
@@ -2390,7 +2390,7 @@ int yyFlexLexer::LexerInput( char* buf, int max_size )
if ( yyin.bad() ) {
return -1;
} else {
- return yyin.gcount();
+ return (int)yyin.gcount();
}
#endif
}