MdeModulePkg/RegularExpressionDxe:omit unused variable

comment unused variable to avoid warning,and modify inf build option.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dongao Guo <dongao.guo@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Guo, Dongao 2018-10-08 15:56:48 +08:00 committed by Liming Gao
parent 4ee787cc1b
commit 8122c6bc8b
2 changed files with 14 additions and 17 deletions

View File

@ -5603,11 +5603,11 @@ onig_builtin_monitor(OnigCalloutArgs* args, void* user_data)
int r;
int num;
size_t tag_len;
const UChar* start;
const UChar* right;
const UChar* current;
const UChar* string;
const UChar* strend;
// const UChar* start;
// const UChar* right;
// const UChar* current;
// const UChar* string;
// const UChar* strend;
const UChar* tag_start;
const UChar* tag_end;
regex_t* reg;
@ -5615,9 +5615,9 @@ onig_builtin_monitor(OnigCalloutArgs* args, void* user_data)
OnigType type;
OnigValue val;
char buf[20];
FILE* fp;
// FILE* fp;
fp = OutFp;
// fp = OutFp;
r = onig_get_arg_by_callout_args(args, 0, &type, &val);
if (r != ONIG_NORMAL) return r;
@ -5633,11 +5633,11 @@ onig_builtin_monitor(OnigCalloutArgs* args, void* user_data)
}
num = onig_get_callout_num_by_callout_args(args);
start = onig_get_start_by_callout_args(args);
right = onig_get_right_range_by_callout_args(args);
current = onig_get_current_by_callout_args(args);
string = onig_get_string_by_callout_args(args);
strend = onig_get_string_end_by_callout_args(args);
// start = onig_get_start_by_callout_args(args);
// right = onig_get_right_range_by_callout_args(args);
// current = onig_get_current_by_callout_args(args);
// string = onig_get_string_by_callout_args(args);
// strend = onig_get_string_end_by_callout_args(args);
reg = onig_get_regex_by_callout_args(args);
tag_start = onig_get_callout_tag_start(reg, num);
tag_end = onig_get_callout_tag_end(reg, num);
@ -5653,7 +5653,7 @@ onig_builtin_monitor(OnigCalloutArgs* args, void* user_data)
for (i = 0; i < tag_len; i++) buf[i] = tag_start[i];
buf[tag_len] = '\0';
}
/*
fprintf(fp, "ONIG-MONITOR: %-4s %s at: %d [%d - %d] len: %d\n",
buf,
in == ONIG_CALLOUT_IN_PROGRESS ? "=>" : "<=",
@ -5662,7 +5662,7 @@ onig_builtin_monitor(OnigCalloutArgs* args, void* user_data)
(int )(right - string),
(int )(strend - string));
//fflush(fp);
*/
return ONIG_CALLOUT_SUCCESS;
}

View File

@ -107,8 +107,5 @@
# Oniguruma: signed and unsigned mismatch/cast
MSFT:*_*_*_CC_FLAGS = /wd4018 /wd4245 /wd4389
# Oniguruma: error: variable 'fp' set but not used
GCC:*_*_*_CC_FLAGS = -Wno-error=unused-but-set-variable
# Oniguruma: tag_end in parse_callout_of_name
GCC:*_*_*_CC_FLAGS = -Wno-error=maybe-uninitialized