--- layout: fc_discuss_archives title: Message 14 from Frama-C-discuss on March 2009 ---
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] Best approach when specifying regular C functions from stdlib?



On Tue, Mar 3, 2009 at 14:32, David MENTRE <dmentre at linux-france.org> wrote:
> ?1. I still have a bug with main():
> ? ? dev-random-pass-gen.c:71: Bug: unsupported variadic functions
> ? ? Dropping definition of function main
>
> I have followed you recommendation, i.e. I declare main() as:
> ?int main(int argc, char *argv[])

Here is the smallest program that triggers the issue:
===
#include <stdlib.h>
#include <fcntl.h>


void main(void)
{
        static int rand_fd = -1;

        rand_fd = open("/dev/urandom", O_RDONLY);
}
===

Apparently, this is the call to open() (which is itself variadic),
that triggers the issue.

Yours,
d.