warning: assignment makes pointer from integer without a cast
I get that when I compile a C file where the function is defined as this:
char **getvars()
and the calling function has this declared:
char **s;
and I write:
s=getvars();
What am I forgetting?
10 9457
Never mind. getvars() wasn't in my prototypes and that was the cause.
I'm back. I'm getting the error again and it seems inconsistent. Yes, I'm changing things in the body of the code but sometimes this warnings pops up and other times it doesn't. Anyone see anything I'm missing?
Ok, I found out there was another include file I forgot to include and now it's solved.
Ok, I found out there was another include file I forgot to include and now it's solved.
Are u OK?
Do u have temperature?
Savage
Are u OK?
Do u have temperature?
Savage
I think the dr. needs a Doctor. :D dr., you should know better then to post a question with not enough info to solve it. ;) Might have to tell Mary on you.
Adrian
As a rule of thumb: when the compiler complains about a cast you know that
there was no prototype in scope which usually means that you forgot to mention
an include file; especially when the element (function) wasn't yours.
kind regards,
Jos
Yeah, I don't have problems with pointers but the pointer to pointer syntax is what I thought was screwed up. I did have that messed up, too, as it turned out but it works now.
We don't have these problems in assembly language. Everything should be done in assembly.
Yeah, I don't have problems with pointers but the pointer to pointer syntax is what I thought was screwed up. I did have that messed up, too, as it turned out but it works now.
We don't have these problems in assembly language. Everything should be done in assembly.
LOL, yeah. I think I would rather die from a thousand cuts.
Adrian
Yeah, I don't have problems with pointers but the pointer to pointer syntax is what I thought was screwed up. I did have that messed up, too, as it turned out but it works now.
We don't have these problems in assembly language. Everything should be done in assembly.
No thank u.
I will rather mess up with pointer to pointer syntax.
Savage
Hello,
I got the same warning using strrch() function:
compileing with GNU gcc 3.3.2 the following code:
# include <stdio.h>
#include <math.h>
:
{
char line[1000];
char comment=';';
int c0;
:
c0=strrchr(line,comment);
:
}
What can be the reason?
Thank you ;)))
Sign in to post your reply or Sign up for a free account.
Similar topics
by: MK |
last post by:
I am a newbie. Please help. The following warning is issued by gcc-3.2.2
compiler (pc Linux):
==================================================================
read_raw_data.c:51: warning:...
|
by: David Ford |
last post by:
I have a macro that I use across the board for freeing ram. I'd like to
clean up my code so I don't get these warnings.
#define sfree(x) _internal_sfree((void **)&x)
#define _internal_sfree(x)...
|
by: Dawn Minnis |
last post by:
Hi
When I compile my files I get the following:
driver.c: In function `main':
driver.c:49: warning: assignment makes integer from pointer without a
cast
driver.c:50: warning: assignment...
|
by: jose_luis_fdez_diaz_news |
last post by:
Hi,
If I don't include <libgen.h> I get then warnig below in regcmp call:
warning: improper pointer/integer combination: op "="
but if I include it the warning is not shown, but them program...
|
by: francescomoi |
last post by:
Hi.
I'm trying to compile this piece of source:
-------------------------------------------
int id;
while(row1 = mysql_fetch_row(rs1))
{
id = atoi((int)row1);...
|
by: junky_fellow |
last post by:
Consider the following piece of code:
struct junk {
int i_val;
int i_val1;
char c_val;
};
int main(void)
{
|
by: metalinc |
last post by:
hi...im new to C programming...need help...tried to run this code but got this error
fork.c: In function ‘parse’:
fork.c:44: warning: comparison between pointer and integer
fork.c:51: warning:...
|
by: mrmattborja |
last post by:
Hello,
Here is a program I'm playing around with for fun in the process of learning C. The objective is to create a function filesize() and call it from within the main() section to retrieve the...
|
by: woods1313drew |
last post by:
The following code in c+ gives me the warning assignment makes integer from pointer without a cast.
destination is set as char destination to limit the input string to 10 characters.
name is an...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |