Fixed spelling errors detected by code-spell utility. (#895)

* Fixed spelling errors detected by code-spell utility.

* Fixed cppcheck preprocessorErrorDirective. Suppressed new cppcheck warnings until fixed.
This commit is contained in:
Steve Karg
2025-01-21 13:31:43 -06:00
committed by GitHub
parent ece31443b6
commit cfe257fe69
12 changed files with 36 additions and 31 deletions
+2 -2
View File
@@ -76,7 +76,7 @@ static struct Address_Cache_Entry {
*/
void address_protected_entry_index_set(uint32_t top_protected_entry_index)
{
if (top_protected_entry_index <= (MAX_ADDRESS_CACHE - 1)) {
if (top_protected_entry_index < MAX_ADDRESS_CACHE) {
Top_Protected_Entry = top_protected_entry_index;
}
}
@@ -976,7 +976,7 @@ int rr_address_list_encode(uint8_t *apdu, BACNET_READ_RANGE_DATA *pRequest)
/**
* Scan the cache and eliminate any expired entries. Should be called
* periodically to ensure the cache is managed correctly. If this function
* is never called at all the whole cache is effectivly rendered static and
* is never called at all the whole cache is effectively rendered static and
* entries never expire unless explicitly deleted.
*
* @param uSeconds Approximate number of seconds since last call to this
+2 -2
View File
@@ -1138,7 +1138,7 @@ uint16_t bacnet_discover_vendor_id(void)
*/
void bacnet_discover_seconds_set(unsigned int seconds)
{
Discovery_Milliseconds = seconds * 1000;
Discovery_Milliseconds = (unsigned long)seconds * 1000UL;
}
/**
@@ -1147,7 +1147,7 @@ void bacnet_discover_seconds_set(unsigned int seconds)
*/
unsigned int bacnet_discover_seconds(void)
{
return Discovery_Milliseconds = 1000;
return Discovery_Milliseconds = 1000UL;
}
/**
+1 -1
View File
@@ -1113,7 +1113,7 @@ int TL_encode_by_sequence(uint8_t *apdu, BACNET_READ_RANGE_DATA *pRequest)
uint32_t uiIndex = 0; /* Current entry number */
uint32_t uiFirst = 0; /* Entry number we started encoding from */
uint32_t uiLast = 0; /* Entry number we finished encoding on */
uint32_t uiSequence = 0; /* Tracking sequenc number when encoding */
uint32_t uiSequence = 0; /* Tracking sequence number when encoding */
uint32_t uiRemaining = 0; /* Amount of unused space in packet */
uint32_t uiFirstSeq = 0; /* Sequence number for 1st record in log */