Fixed compiler warnings, pre-commit tests

pull/324/head
Daniele Lacamera 2021-02-16 13:20:19 +01:00
parent 882e662bbf
commit 52a1e13470
2 changed files with 8 additions and 4 deletions

View File

@ -57,8 +57,8 @@
#endif /* WOLFSSH_NO_DEFAULT_LOGGING_CB */
static enum wolfSSH_LogLevel logLevel = WS_LOG_DEFAULT;
#ifdef DEBUG_WOLFSSH
static enum wolfSSH_LogLevel logLevel = WS_LOG_DEFAULT;
static int logEnable = 0;
#endif
@ -180,10 +180,14 @@ void wolfSSH_Log(enum wolfSSH_LogLevel level, const char *const fmt, ...)
#else
void DefaultLoggingCb(enum wolfSSH_LogLevel level, const char *const msgStr)
{
(void)level;
(void)msgStr;
}
void wolfSSH_Log(enum wolfSSH_LogLevel level, const char *const fmt, ...)
{
(void)level;
(void)fmt;
}
#endif /* DEBUG_WOLFSSH */

View File

@ -894,7 +894,7 @@ static int GetScpFileSize(WOLFSSH* ssh, byte* buf, word32 bufSz,
if (ret == WS_SUCCESS) {
/* replace space with newline for atoi */
buf[spaceIdx] = '\n';
ssh->scpFileSz = strtol((char *)(buf + idx), buf + spaceIdx, 10);
ssh->scpFileSz = strtol((char *)(buf + idx), NULL, 10);
/* restore space, increment idx to space */
buf[spaceIdx] = ' ';
@ -1000,7 +1000,7 @@ static int GetScpTimestamp(WOLFSSH* ssh, byte* buf, word32 bufSz,
if (ret == WS_SUCCESS) {
/* replace space with newline for atoi */
buf[spaceIdx] = '\n';
ssh->scpMTime = strtol((char*)(buf + idx), buf + spaceIdx, 10);
ssh->scpMTime = strtol((char*)(buf + idx), NULL, 10);
/* restore space, increment idx past it */
buf[spaceIdx] = ' ';
@ -1032,7 +1032,7 @@ static int GetScpTimestamp(WOLFSSH* ssh, byte* buf, word32 bufSz,
if (ret == WS_SUCCESS) {
/* replace space with newline for atoi */
buf[spaceIdx] = '\n';
ssh->scpATime = strtol((char*)(buf + idx), buf + spaceIdx, 10);
ssh->scpATime = strtol((char*)(buf + idx), NULL, 10);
/* restore space, increment idx past it */
buf[spaceIdx] = ' ';