PC-Lint: undeclared funtion

S

suppamax

Hi everybody!

I'm using for the first time PC-Lint.

I'm analysing my C program for Microchip PIC18F
microcontroller.

In particualr I have a problem with library
functions like "memcpy" or "ltoa".

I've included <string.h> and <stdlib.h> in my
files, and I've added their path in my lin.bat file.

But it seems that PC-lint is unable to recognise
them, since I receive the following message

(void)memcpy((void *)&FailureBuffer.date,
(const void *)&g_CurrentTime, sizeof(timestamp_t));
...\source files\app_check.c 292 Info 718: Symbol
'memcpy' undeclared, assumed
to return int
...\source files\app_check.c 292 Info 746: call
to function 'memcpy()' not
made in the presence of a prototype

and

Warning 526: Symbol 'memcpy()' (line 292, file
...\source files\app_check.c) not
defined
...\source files\app_check.c 292 Info 830:
Location cited in prior message
Warning 628: no argument information provided for
function 'memcpy()' (line
292, file ..\source files\app_check.c)
...\source files\app_check.c 292 Info 830:
Location cited in prior message


What can I do?


Thanks,


Max
 
U

user923005

Hi everybody!

I'm using for the first time PC-Lint.

I'm analysing my C program for Microchip PIC18F
microcontroller.

In particualr I have a problem with library
functions like "memcpy" or "ltoa".

I've included <string.h> and <stdlib.h> in my
files, and I've added their path in my lin.bat file.

But it seems that PC-lint is unable to recognise
them, since I receive the following message

    (void)memcpy((void *)&FailureBuffer.date,
(const void *)&g_CurrentTime, sizeof(timestamp_t));
..\source files\app_check.c  292  Info 718: Symbol
'memcpy' undeclared, assumed
    to return int
..\source files\app_check.c  292  Info 746: call
to function 'memcpy()' not
    made in the presence of a prototype

and

Warning 526: Symbol 'memcpy()' (line 292, file
..\source files\app_check.c) not
    defined
..\source files\app_check.c  292  Info 830:
Location cited in prior message
Warning 628: no argument information provided for
function 'memcpy()' (line
    292, file ..\source files\app_check.c)
..\source files\app_check.c  292  Info 830:
Location cited in prior message

What can I do?

<ot>
Define the path variable so that pc-lint can find the headers.
</ot>

It's in the documentation.
 
B

Barry Schwarz

Hi everybody!

I'm using for the first time PC-Lint.

I'm analysing my C program for Microchip PIC18F
microcontroller.

In particualr I have a problem with library
functions like "memcpy" or "ltoa".

I've included <string.h> and <stdlib.h> in my
files, and I've added their path in my lin.bat file.

But it seems that PC-lint is unable to recognise
them, since I receive the following message

(void)memcpy((void *)&FailureBuffer.date,
(const void *)&g_CurrentTime, sizeof(timestamp_t));

Others have addressed the lint problem. But why, if you have a
prototype in scope, are you casting the arguments to memcpy? It
cannot help and my even camouflage undefined behavior.


Remove del for email
 
C

Chris H

In message
Hi everybody!

I'm using for the first time PC-Lint.

I'm analysing my C program for Microchip PIC18F
microcontroller.

In particualr I have a problem with library
functions like "memcpy" or "ltoa".
What can I do?

Contact Gimpel support?
Ask on the forum on the Gimpel web site?

\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top