Skip to content

Commit

Permalink
Reverted change that caused doxygen to return error code 2 when it pr…
Browse files Browse the repository at this point in the history
…oduced a warning
  • Loading branch information
Dimitri van Heesch committed Dec 19, 2015
1 parent ae6311e commit f9e6fe0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/doxygen.cpp
Expand Up @@ -170,7 +170,6 @@ QCString Doxygen::spaces;
bool Doxygen::generatingXmlOutput = FALSE;
bool Doxygen::markdownSupport = TRUE;
GenericsSDict *Doxygen::genericsDict;
int Doxygen::exitCode = 0;

// locally accessible globals
static QDict<EntryNav> g_classEntries(1009);
Expand Down
1 change: 0 additions & 1 deletion src/doxygen.h
Expand Up @@ -152,7 +152,6 @@ class Doxygen
static bool generatingXmlOutput;
static bool markdownSupport;
static GenericsSDict *genericsDict;
static int exitCode;
};

void initDoxygen();
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Expand Up @@ -36,6 +36,6 @@ int main(int argc,char **argv)
adjustConfiguration();
parseInput();
generateOutput();
return Doxygen::exitCode;
return 0;
}

11 changes: 6 additions & 5 deletions src/message.cpp
Expand Up @@ -97,7 +97,8 @@ void initWarningFormat()
warnFile = stderr;
}

if (Config_getBool("WARN_AS_ERROR")) {
if (Config_getBool("WARN_AS_ERROR"))
{
warning_str = error_str;
}
}
Expand Down Expand Up @@ -149,17 +150,17 @@ static void format_warn(const char *file,int line,const char *text)
),
"$text",textSubst
);
if (warnAsError) {
if (warnAsError)
{
msgText += " (warning treated as error, aborting now)";
}
msgText += '\n';

// print resulting message
fwrite(msgText.data(),1,msgText.length(),warnFile);
if (warnAsError) {
if (warnAsError)
{
exit(1);
} else {
Doxygen::exitCode = 2;
}
}

Expand Down

0 comments on commit f9e6fe0

Please sign in to comment.