mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-08-08 06:32:25 -04:00
Silence splint somewhat
The only real changes are some unitialized variables and that we now make explicit that we don't care about the return value from memset().
This commit is contained in:
parent
b0efcf019e
commit
09c1f3f549
5 changed files with 22 additions and 4 deletions
|
@ -104,6 +104,7 @@ void *memset(void *dest, int c, unsigned n)
|
|||
for (; n; n--, s++)
|
||||
*s = (uint8_t)c;
|
||||
|
||||
/*@ -temptrans @*/
|
||||
return dest;
|
||||
}
|
||||
|
||||
|
@ -117,6 +118,11 @@ void memcpy_s(void *dest, size_t destsize, const void *src, size_t n)
|
|||
uint8_t *dest_byte = (uint8_t *)dest;
|
||||
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
/*@ -nullderef @*/
|
||||
/* splint complains that dest_byte and src_byte can be
|
||||
* NULL, but it seems it doesn't understand assert.
|
||||
* See above.
|
||||
*/
|
||||
dest_byte[i] = src_byte[i];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue