Skip to content

Commit

Permalink
Want to try using lld and llu with the c90 checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Skptak committed Dec 14, 2023
1 parent 20c4a10 commit aa55860
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .github/.cSpellWords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ ctest
fracs
lcov
ldms
lldms
llums
lums
misra
sinclude
Expand Down
12 changes: 6 additions & 6 deletions source/core_sntp_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ static SntpStatus_t processServerResponse( SntpContext_t * pContext,
{
/* Server has responded successfully with time, and we have calculated the clock offset
* of system clock relative to the server.*/
LogDebug( ( "Updating system time: ServerTime=%lu %lums ClockOffset=%ldms",
LogDebug( ( "Updating system time: ServerTime=%lu %lums ClockOffset=%lldms",
( unsigned long ) parsedResponse.serverTime.seconds,
( unsigned long ) FRACTIONS_TO_MS( parsedResponse.serverTime.fractions ),
( long ) parsedResponse.clockOffsetMs ) );
Expand Down Expand Up @@ -810,26 +810,26 @@ static bool decideAboutReadRetry( const SntpTimestamp_t * pCurrentTime,
*pHasResponseTimedOut = true;

LogError( ( "Unable to receive response: Server response has timed out: "
"RequestTime=%lus %lums, TimeoutDuration=%lums, ElapsedTime=%ld",
"RequestTime=%lus %lums, TimeoutDuration=%lums, ElapsedTime=%llu",
( unsigned long ) pRequestTime->seconds,
( unsigned long ) FRACTIONS_TO_MS( pRequestTime->fractions ),
( unsigned long ) responseTimeoutMs,
( unsigned long ) timeSinceRequestMs ) );
timeSinceRequestMs ) );
}
/* Check whether the block time window has expired to determine whether read can be retried. */
else if( timeElapsedInReadAttempts >= ( uint64_t ) blockTimeMs )
{
shouldRetry = false;
LogDebug( ( "Did not receive server response: Read block time has expired: "
"BlockTime=%lums, ResponseWaitElapsedTime=%lums",
"BlockTime=%lums, ResponseWaitElapsedTime=%llums",
( unsigned long ) blockTimeMs,
( unsigned long ) timeSinceRequestMs ) );
timeSinceRequestMs ) );
}
else
{
shouldRetry = true;
LogDebug( ( "Did not receive server response: Retrying read: "
"BlockTime=%lums, ResponseWaitElapsedTime=%lums, ResponseTimeout=%lu",
"BlockTime=%lums, ResponseWaitElapsedTime=%llums, ResponseTimeout=%lu",
( unsigned long ) blockTimeMs,
( unsigned long ) timeSinceRequestMs,
( unsigned long ) responseTimeoutMs ) );
Expand Down

0 comments on commit aa55860

Please sign in to comment.