mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-15 19:17:26 -07:00
FIX: supress gcc warnings like libjansson
https://github.com/akheron/jansson/pull/423/files
This commit is contained in:
parent
8f18a9abf2
commit
96361abd97
3 changed files with 5 additions and 5 deletions
|
@ -89,7 +89,7 @@ static void error_set(json_error_t *error, const lex_t *lex,
|
|||
{
|
||||
va_list ap;
|
||||
char msg_text[JSON_ERROR_TEXT_LENGTH];
|
||||
char msg_with_context[JSON_ERROR_TEXT_LENGTH + 20];
|
||||
char msg_with_context[JSON_ERROR_TEXT_LENGTH];
|
||||
|
||||
int line = -1, col = -1;
|
||||
size_t pos = 0;
|
||||
|
@ -115,7 +115,7 @@ static void error_set(json_error_t *error, const lex_t *lex,
|
|||
{
|
||||
if(lex->saved_text.length <= 20) {
|
||||
snprintf(msg_with_context, JSON_ERROR_TEXT_LENGTH, "%s near '%s'", msg_text, saved_text);
|
||||
msg_with_context[JSON_ERROR_TEXT_LENGTH + 20 - 1] = '\0';
|
||||
msg_with_context[JSON_ERROR_TEXT_LENGTH - 1] = '\0';
|
||||
result = msg_with_context;
|
||||
}
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ static void error_set(json_error_t *error, const lex_t *lex,
|
|||
}
|
||||
else {
|
||||
snprintf(msg_with_context, JSON_ERROR_TEXT_LENGTH, "%s near end of file", msg_text);
|
||||
msg_with_context[JSON_ERROR_TEXT_LENGTH + 20 - 1] = '\0';
|
||||
msg_with_context[JSON_ERROR_TEXT_LENGTH - 1] = '\0';
|
||||
result = msg_with_context;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue