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 proteancode.com (Roderick Chapman)
- Date: Thu, 18 Jul 2019 16:27:01 +0100
- In-reply-to: <2e187c1a-d6d6-3738-df66-1ed684eaea4d@proteancode.com>
- References: <2e187c1a-d6d6-3738-df66-1ed684eaea4d@proteancode.com>
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, Â Rod -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20190718/7db902ba/attachment.html>
- Follow-Ups:
- [Frama-c-discuss] Warnings for call to memcpy()... why?
- From: virgile.prevosto at m4x.org (Virgile Prevosto)
- [Frama-c-discuss] Frama-C on Windows 10 via WSL
- From: Patrick.Baudin at cea.fr (BAUDIN Patrick)
- [Frama-c-discuss] Warnings for call to memcpy()... why?
- Prev by Date: [Frama-c-discuss] Help with -wp-init-const and static evaluation of constants
- Next by Date: [Frama-c-discuss] Help with -wp-init-const and static evaluation of constants
- Previous by thread: [Frama-c-discuss] Why does a string literal not satisfy valid_read_string?
- Next by thread: [Frama-c-discuss] Warnings for call to memcpy()... why?
- Index(es):