From b198864a75f73f1a125a048919fa849710d10fe0 Mon Sep 17 00:00:00 2001 From: Simon Sobisch Date: Tue, 22 Jun 2021 20:27:20 +0200 Subject: 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. --- src/cpp-flex.skl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } -- cgit v1.2.1