From fdfb027f346c30d6cd209b366e6cb879fb11cbcb Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 28 Aug 2016 13:27:05 +0200 Subject: Warnings from CLANG compiler The CLANG compiler gave some warnings after pull request #503 ("Introducing commands includedoc and snippetdoc ") at places that are not / should not be reachable. --- src/docbookvisitor.cpp | 5 +++++ src/docparser.cpp | 5 +++++ src/htmldocvisitor.cpp | 5 +++++ src/latexdocvisitor.cpp | 5 +++++ src/mandocvisitor.cpp | 5 +++++ src/perlmodgen.cpp | 5 +++++ src/printdocvisitor.h | 6 ++++++ src/rtfdocvisitor.cpp | 5 +++++ src/xmldocvisitor.cpp | 5 +++++ 9 files changed, 46 insertions(+) diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp index ec320e9..535d294 100644 --- a/src/docbookvisitor.cpp +++ b/src/docbookvisitor.cpp @@ -359,6 +359,11 @@ void DocbookDocVisitor::visit(DocInclude *inc) ); m_t << ""; break; + case DocInclude::SnippetDoc: + case DocInclude::IncludeDoc: + err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s" + "Please create a bug report\n",__FILE__); + break; } } diff --git a/src/docparser.cpp b/src/docparser.cpp index afeb35f..cdf549a 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -1941,6 +1941,11 @@ void DocInclude::parse() m_blockId.data(),m_file.data(),count); } break; + case DocInclude::SnippetDoc: + case DocInclude::IncludeDoc: + err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s" + "Please create a bug report\n",__FILE__); + break; } } diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index b589f71..1b1bc98 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -585,6 +585,11 @@ void HtmlDocVisitor::visit(DocInclude *inc) forceStartParagraph(inc); } break; + case DocInclude::SnippetDoc: + case DocInclude::IncludeDoc: + err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s" + "Please create a bug report\n",__FILE__); + break; } } diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 2c1bc37..13491e9 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -483,6 +483,11 @@ void LatexDocVisitor::visit(DocInclude *inc) m_t << "\\end{DoxyCodeInclude}" << endl; } break; + case DocInclude::SnippetDoc: + case DocInclude::IncludeDoc: + err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s" + "Please create a bug report\n",__FILE__); + break; } } diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index 6b06958..771cd80 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -306,6 +306,11 @@ void ManDocVisitor::visit(DocInclude *inc) m_t << ".PP" << endl; m_firstCol=TRUE; break; + case DocInclude::SnippetDoc: + case DocInclude::IncludeDoc: + err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s" + "Please create a bug report\n",__FILE__); + break; } } diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index 09e1968..0cd9911 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -716,6 +716,11 @@ void PerlModDocVisitor::visit(DocInclude *inc) case DocInclude::LatexInclude: type = "latexonly"; break; case DocInclude::VerbInclude: type = "preformatted"; break; case DocInclude::Snippet: return; + case DocInclude::SnippetDoc: + case DocInclude::IncludeDoc: + err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s" + "Please create a bug report\n",__FILE__); + break; } openItem(type); m_output.addFieldQuotedString("content", inc->text()); diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h index b86670a..499fac2 100644 --- a/src/printdocvisitor.h +++ b/src/printdocvisitor.h @@ -22,6 +22,7 @@ #include #include "docvisitor.h" #include "htmlentity.h" +#include "message.h" /*! Concrete visitor implementation for pretty printing */ class PrintDocVisitor : public DocVisitor @@ -170,6 +171,11 @@ class PrintDocVisitor : public DocVisitor case DocInclude::LatexInclude: printf("latexinclude"); break; case DocInclude::VerbInclude: printf("verbinclude"); break; case DocInclude::Snippet: printf("snippet"); break; + case DocInclude::SnippetDoc: + case DocInclude::IncludeDoc: + err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s" + "Please create a bug report\n",__FILE__); + break; } printf("\"/>"); } diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index 1e539ff..76da457 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -444,6 +444,11 @@ void RTFDocVisitor::visit(DocInclude *inc) ); m_t << "}"; break; + case DocInclude::SnippetDoc: + case DocInclude::IncludeDoc: + err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s" + "Please create a bug report\n",__FILE__); + break; } m_lastIsPara=TRUE; } diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index 1f5dea3..b0d6551 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -329,6 +329,11 @@ void XmlDocVisitor::visit(DocInclude *inc) ); m_t << ""; break; + case DocInclude::SnippetDoc: + case DocInclude::IncludeDoc: + err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s" + "Please create a bug report\n",__FILE__); + break; } } -- cgit v0.12 From 2b229f69041023f5f473385ee587ef7743850f55 Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 30 Aug 2016 14:37:13 +0200 Subject: Code with "extension" unparsed shows line numbers When using a code fragment in "regular" documentation like: @code This is a code fragment @endcode this is shown without line numbers but when using {unparsed} or another unknown extension, so @code{unparsed} This is a code fragment @endcode line numbers were shown. (similar for the markdown fenced block). --- src/fileparser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fileparser.cpp b/src/fileparser.cpp index b54b243..6883622 100644 --- a/src/fileparser.cpp +++ b/src/fileparser.cpp @@ -22,7 +22,7 @@ void FileParser::parseCode(CodeOutputInterface &codeOutIntf, SrcLangExt, // lang bool, // isExampleBlock const char *, // exampleName - FileDef *, // fileDef + FileDef * fileDef, int startLine, int endLine, bool, // inlineFragment @@ -40,8 +40,8 @@ void FileParser::parseCode(CodeOutputInterface &codeOutIntf, int j=i; while (j