diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-03-02 19:10:51 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-03-08 13:31:54 (GMT) |
commit | 4658413ff3b9551fac67907f296a586e9f2c15ed (patch) | |
tree | 495ea78acb2a9d7463540f9e711530a0d42f3e72 /src/fortranscanner.l | |
parent | 6c06e912338176303d1a1e041a39984ff6fd42be (diff) | |
download | Doxygen-4658413ff3b9551fac67907f296a586e9f2c15ed.zip Doxygen-4658413ff3b9551fac67907f296a586e9f2c15ed.tar.gz Doxygen-4658413ff3b9551fac67907f296a586e9f2c15ed.tar.bz2 |
Enabled stricter compiler warnings and fixed all new warnings
Diffstat (limited to 'src/fortranscanner.l')
-rw-r--r-- | src/fortranscanner.l | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 3a5123c..95842f0 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -144,7 +144,7 @@ struct CommentInPrepass { int column; QCString str; - CommentInPrepass(int column, QCString str) : column(column), str(str) {} + CommentInPrepass(int col, QCString s) : column(col), str(s) {} }; /* ----------------------------------------------------------------- @@ -213,7 +213,7 @@ static QCString extractFromParens(const QCString name); static QCString extractBind(const QCString name); -static int yyread(yyscan_t yyscanner,char *buf,int max_size); +static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size); static void startCommentBlock(yyscan_t yyscanner,bool); static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief); static void subrHandleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief); @@ -927,7 +927,7 @@ private { if (strt != 0) lft = yyextra->current_root->type.left(strt).stripWhiteSpace(); if ((yyextra->current_root->type.length() - strt - strlen("function"))!= 0) { - rght = yyextra->current_root->type.right(yyextra->current_root->type.length() - strt - strlen("function")).stripWhiteSpace(); + rght = yyextra->current_root->type.right(yyextra->current_root->type.length() - strt - (int)strlen("function")).stripWhiteSpace(); } yyextra->current_root->type = lft; if (rght.length() > 0) @@ -1567,7 +1567,7 @@ const char* prepassFixedForm(const char* contents, int *hasContLine) bool fullCommentLine=TRUE; bool artificialComment=FALSE; bool spaces=TRUE; - int newContentsSize = strlen(contents)+3; // \000, \n (when necessary) and one spare character (to avoid reallocation) + int newContentsSize = (int)strlen(contents)+3; // \000, \n (when necessary) and one spare character (to avoid reallocation) char* newContents = (char*)malloc(newContentsSize); int curLine = 1; @@ -1643,7 +1643,7 @@ const char* prepassFixedForm(const char* contents, int *hasContLine) return NULL; } newContents[j]='\000'; - newContentsSize = strlen(newContents); + newContentsSize = (int)strlen(newContents); if (newContents[newContentsSize - 1] != '\n') { // to be on the safe side @@ -1786,7 +1786,7 @@ const char* prepassFixedForm(const char* contents, int *hasContLine) free(newContents); return NULL; } - newContentsSize = strlen(newContents); + newContentsSize = (int)strlen(newContents); if (newContents[newContentsSize - 1] != '\n') { // to be on the safe side @@ -2316,10 +2316,10 @@ static bool endScope(yyscan_t yyscanner,Entry *scope, bool isGlobalRoot) return TRUE; } -static int yyread(yyscan_t yyscanner,char *buf,int max_size) +static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; - int c=0; + yy_size_t c=0; while ( c < max_size && yyextra->inputString[yyextra->inputPosition] ) { *buf = yyextra->inputString[yyextra->inputPosition++] ; @@ -2569,7 +2569,7 @@ static void subrHandleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool b (directionParam[dir1] == directionParam[SymbolModifiers::IN])) { // strip direction - loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::IN])); + loc_doc = loc_doc.right(loc_doc.length()-(int)strlen(directionParam[SymbolModifiers::IN])); loc_doc.stripWhiteSpace(); // in case of empty documentation or (now) just name, consider it as no documentation if (!loc_doc.isEmpty() && (loc_doc.lower() != yyextra->argName.lower())) @@ -2593,7 +2593,7 @@ static void subrHandleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool b if ((directionParam[dir1] == directionParam[SymbolModifiers::NONE_D]) || (directionParam[dir1] == directionParam[SymbolModifiers::OUT])) { - loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::OUT])); + loc_doc = loc_doc.right(loc_doc.length()-(int)strlen(directionParam[SymbolModifiers::OUT])); loc_doc.stripWhiteSpace(); if (loc_doc.isEmpty() || (loc_doc.lower() == yyextra->argName.lower())) { @@ -2617,7 +2617,7 @@ static void subrHandleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool b if ((directionParam[dir1] == directionParam[SymbolModifiers::NONE_D]) || (directionParam[dir1] == directionParam[SymbolModifiers::INOUT])) { - loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::INOUT])); + loc_doc = loc_doc.right(loc_doc.length()-(int)strlen(directionParam[SymbolModifiers::INOUT])); loc_doc.stripWhiteSpace(); if (!loc_doc.isEmpty() && (loc_doc.lower() != yyextra->argName.lower())) { |