By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,492 Members | 1,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,492 IT Pros & Developers. It's quick & easy.

PC-Lint: undeclared funtion

P: n/a
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.hand <stdlib.hin 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
Jun 27 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
"suppamax" <ma************@gmail.comwrote in message
news:ff**********************************@f63g2000 hsf.googlegroups.com...
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".
The topic here is only the C language, not specific
tools. However, see:

http://www.gimpel.com/html/support.htm

-Mike
Jun 27 '08 #2

P: n/a
On Jun 19, 7:02*am, suppamax <max.giacome...@gmail.comwrote:
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.hand <stdlib.hin 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.
Jun 27 '08 #3

P: n/a
On Thu, 19 Jun 2008 07:02:00 -0700 (PDT), suppamax
<ma************@gmail.comwrote:
>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.hand <stdlib.hin 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
Jun 27 '08 #4

P: n/a
In message
<ff**********************************@f63g2000hsf. googlegroups.com>,
suppamax <ma************@gmail.comwrites
>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 /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Jun 27 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.