message: Warning [2054] suspicious pointer conversion

Status
Not open for further replies.

mahesh.bwela

New Member
I recently joined to this site.
I'm new to chip programming.
I have tried a C program bellow on pic 18f 2550 micro controller in pic kit2.

#include<stdio.h>
#include<stdlib.h>

#define N200

void main(void)//int argc, cahr *argv[]
{
int i=5;
//for(i=0;i<argc;i++)
// printf("parameter %d is %s\n",i,argv)
//return 1;
printf(i);
}

it is built but it shows the
12:Warning [2054] suspicious pointer conversion

but since it is built will it work.
Can anyone help me, please?
 
printf() is expecting a string pointer ie.. "char * "... ' i ' has been declared an int.... I will compile and build.. but won't work...

What are you printing to?.... Is it the RS232 port? If so you can use putch( asc(i)); or "print(itoa(i));"
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…