473,804 Members | 3,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

warning: assignment makes pointer from integer without a cast

drhowarddrfine
7,435 Recognized Expert Expert
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?
May 18 '07 #1
10 9506
drhowarddrfine
7,435 Recognized Expert Expert
Never mind. getvars() wasn't in my prototypes and that was the cause.
May 18 '07 #2
drhowarddrfine
7,435 Recognized Expert Expert
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?
May 18 '07 #3
drhowarddrfine
7,435 Recognized Expert Expert
Ok, I found out there was another include file I forgot to include and now it's solved.
May 19 '07 #4
Savage
1,764 Recognized Expert Top Contributor
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
May 19 '07 #5
AdrianH
1,251 Recognized Expert Top Contributor
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
May 19 '07 #6
JosAH
11,448 Recognized Expert MVP
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
May 19 '07 #7
drhowarddrfine
7,435 Recognized Expert Expert
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.
May 19 '07 #8
AdrianH
1,251 Recognized Expert Top Contributor
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
May 19 '07 #9
Savage
1,764 Recognized Expert Top Contributor
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
May 19 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

27
4773
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: assignment makes pointer from integer without a cast ================================================================== when the following piece of code was compiled. The offending statement is calloc. A similar statement in the main() function...
16
4459
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) ({ if(x && *x) { free(*x); *x=NULL; } }) void somefunction() { char *x = malloc(10); int *y = malloc(10);
4
36187
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 makes integer from pointer without a cast driver.c:51: warning: assignment makes integer from pointer without a
16
5873
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 compiles fine. What is the warning shown ?
2
14363
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); -----------------------------------
29
2530
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) {
4
6571
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: assignment makes integer from pointer without a cast fork.c:61: warning: comparison between pointer and integer /tmp/cciECfg4.o: In function `main': fork.c:(.text+0x3a): warning: the `gets' function is dangerous and should not be used. #include...
3
17220
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 size in bytes of a file that I give it. #include <stdio.h> long filesize(f) { FILE *fp;
1
3836
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 array of ten places char name iv looked in several books but cant find an references to integer pointer errors. Could someone tell me what i am doing wrong thanks. scanf("%s",destination); e = (strcmpi(destination,"exit")); ...
0
9571
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6845
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5505
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2976
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.