Skip to content

Commit

Permalink
scilab: display by default warnings for long identifier names
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Marchetto committed Jul 21, 2014
1 parent 46d1ae7 commit 0278261
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions Source/Modules/scilab.cxx
Expand Up @@ -61,7 +61,6 @@ class SCILAB:public Language {

bool generateBuilder;
bool internalModule;
bool extraWarning;
public:

/* ------------------------------------------------------------------------
Expand All @@ -83,7 +82,6 @@ class SCILAB:public Language {
libraryName = NULL;
generateBuilder = true;
internalModule = false;
extraWarning = false;

/* Manage command line arguments */
for (int argIndex = 1; argIndex < argc; argIndex++) {
Expand Down Expand Up @@ -133,8 +131,6 @@ class SCILAB:public Language {
Swig_mark_arg(argIndex);
libraryName = NewString(argv[argIndex + 1]);
Swig_mark_arg(argIndex + 1);
} else if (strcmp(argv[argIndex], "-Wextra") == 0) {
extraWarning = true;
}
}
}
Expand Down Expand Up @@ -737,10 +733,8 @@ class SCILAB:public Language {

void checkIdentifierName(String *name) {
if (Len(name) > 24) {
if (extraWarning) {
// Warning on too long identifiers
Swig_warning(WARN_LANG_IDENTIFIER, input_file, line_number, "Identifier %s exceeds 24 characters, it may be impossible to use it.\n", name);
}
// Warning on too long identifiers
Swig_warning(WARN_LANG_IDENTIFIER, input_file, line_number, "Identifier %s exceeds 24 characters, it may be impossible to use it.\n", name);
}
}

Expand Down

0 comments on commit 0278261

Please sign in to comment.