Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] Warnings for call to memcpy()... why?

  • Subject: [Frama-c-discuss] Warnings for call to memcpy()... why?
  • From: rod at (Roderick Chapman)
  • Date: Thu, 18 Jul 2019 16:27:01 +0100
  • In-reply-to: <>
  • References: <>

Hello again,

  Another possibly dumb question: in my code, I have a few calls to 
memcpy() to achieve the effect of whole-array assignment - essentially 
copying the entire content of one array onto another.

For each of those calls, I am getting a 2 warnings from WP (version 19) 
like this:

   Cast with incompatible pointers types (source: uint8*) (target: sint8*)

I get one of those for both the "src" and "dest" parameters of memcpy().

I don't understand this for several reasons.

1. My actual parameters are both type "uint8_t *"

2. The formal parameters given in the declaration of memcpy() in 
libc/string.h are

"void *restrict dest", and "const void *restrict src".

So.. where are these references to "uint8*" and "sint8*" coming from? 
There are no such types in my program.

How do I get rid of these warnings?

All the best,


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>