diff options
author | Simon Sobisch <simonsobisch@web.de> | 2021-06-22 20:27:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-22 20:27:20 +0200 |
commit | b198864a75f73f1a125a048919fa849710d10fe0 (patch) | |
tree | dbbdeae97f1e6eb4f9bd151694dde13fa97299c9 | |
parent | 7b073fdda2242a8e4a0f70244c0ae83d34f099b1 (diff) | |
download | flex-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.
-rw-r--r-- | src/cpp-flex.skl | 2 |
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 } |