Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

New Articles From Microcontroller Tips

Back
Top