Debug
- crazygray1
- Member
- Posts: 168
- Joined: Thu Nov 22, 2007 7:18 pm
- Location: USA,Hawaii,Honolulu(Seriously)
Debug
I don't see the prob here:
gcc outputs this:
kristian@Kristian:~/Documents/Decipher/Source/Boot/include$ gcc boot.c
In file included from boot.c:1:
basicio.h:3: warning: large integer implicitly truncated to unsigned type
basicio.h: In function ‘clrscrn’:
basicio.h:9: error: expected ‘;’ before ‘)’ token
basicio.h:9: error: expected expression before ‘)’ token
basicio.h:13: warning: large integer implicitly truncated to unsigned type
basicio.h: In function ‘bprint’:
basicio.h:19: warning: cast to pointer from integer of different size
basicio.h:20: error: expected ‘;’ before ‘)’ token
basicio.h:20: error: expected expression before ‘)’ token
basicio.h:24: warning: comparison is always false due to limited range of data type
as you can see there isn't much in boot.c
Edit: I feel really stupid not seeing the ; needed in the for statments
now there seems to be another thing with them...
gcc outputs this:
kristian@Kristian:~/Documents/Decipher/Source/Boot/include$ gcc boot.c
In file included from boot.c:1:
basicio.h:3: warning: large integer implicitly truncated to unsigned type
basicio.h: In function ‘clrscrn’:
basicio.h:9: error: expected ‘;’ before ‘)’ token
basicio.h:9: error: expected expression before ‘)’ token
basicio.h:13: warning: large integer implicitly truncated to unsigned type
basicio.h: In function ‘bprint’:
basicio.h:19: warning: cast to pointer from integer of different size
basicio.h:20: error: expected ‘;’ before ‘)’ token
basicio.h:20: error: expected expression before ‘)’ token
basicio.h:24: warning: comparison is always false due to limited range of data type
as you can see there isn't much in boot.c
Edit: I feel really stupid not seeing the ; needed in the for statments
now there seems to be another thing with them...
Last edited by crazygray1 on Thu Jan 10, 2008 8:00 pm, edited 1 time in total.
- crazygray1
- Member
- Posts: 168
- Joined: Thu Nov 22, 2007 7:18 pm
- Location: USA,Hawaii,Honolulu(Seriously)
Ok I got it down to this:
kristian@Kristian:~/Documents/Decipher/Source/Boot/include$ gcc -c boot.c
In file included from boot.c:1:
basicio.h:3: warning: large integer implicitly truncated to unsigned type
basicio.h: In function ‘clrscrn’:
basicio.h:9: error: expected expression before ‘)’ token
basicio.h:14: warning: large integer implicitly truncated to unsigned type
basicio.h: In function ‘bprint’:
basicio.h:20: warning: cast to pointer from integer of different size
basicio.h:21: error: expected expression before ‘)’ token
basicio.h:26: warning: comparison is always false due to limited range of data type
I didn't post boot.c because nothing changed there
kristian@Kristian:~/Documents/Decipher/Source/Boot/include$ gcc -c boot.c
In file included from boot.c:1:
basicio.h:3: warning: large integer implicitly truncated to unsigned type
basicio.h: In function ‘clrscrn’:
basicio.h:9: error: expected expression before ‘)’ token
basicio.h:14: warning: large integer implicitly truncated to unsigned type
basicio.h: In function ‘bprint’:
basicio.h:20: warning: cast to pointer from integer of different size
basicio.h:21: error: expected expression before ‘)’ token
basicio.h:26: warning: comparison is always false due to limited range of data type
I didn't post boot.c because nothing changed there
- Attachments
-
- basicio.h
- (1.03 KiB) Downloaded 28 times
- crazygray1
- Member
- Posts: 168
- Joined: Thu Nov 22, 2007 7:18 pm
- Location: USA,Hawaii,Honolulu(Seriously)
I got the error messages down to this:
kristian@Kristian:~/Documents/Decipher/Source/Boot/include$ gcc boot.c
In file included from boot.c:1:
basicio.h: In function ‘clrscrn’:
basicio.h:9: error: expected expression before ‘)’ token
basicio.h:14: warning: assignment makes pointer from integer without a cast
basicio.h: In function ‘bprint’:
basicio.h:21: error: expected expression before ‘)’ token
basicio.h:26: warning: comparison between pointer and integer
kristian@Kristian:~/Documents/Decipher/Source/Boot/include$
what is expression is missing in my for statements?
kristian@Kristian:~/Documents/Decipher/Source/Boot/include$ gcc boot.c
In file included from boot.c:1:
basicio.h: In function ‘clrscrn’:
basicio.h:9: error: expected expression before ‘)’ token
basicio.h:14: warning: assignment makes pointer from integer without a cast
basicio.h: In function ‘bprint’:
basicio.h:21: error: expected expression before ‘)’ token
basicio.h:26: warning: comparison between pointer and integer
kristian@Kristian:~/Documents/Decipher/Source/Boot/include$
what is expression is missing in my for statements?
- Attachments
-
- basicio.h
- (1.04 KiB) Downloaded 64 times
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
- crazygray1
- Member
- Posts: 168
- Joined: Thu Nov 22, 2007 7:18 pm
- Location: USA,Hawaii,Honolulu(Seriously)
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Bull. As said by brynet-inc here, and half the forum in the language-bashing thread, the problem exists between keyboard and chair.crazygray1 wrote:I just have probs with for loops. I never stuck with one particular compiler, syntaxes are somewhat diffrent for each(at least on little things.
Until you can at least fix these problems without help, I do not think you should be discussing anything C related here.
I suggest visiting http://www.cprogramming.com/ which is more suited for people like you.
- crazygray1
- Member
- Posts: 168
- Joined: Thu Nov 22, 2007 7:18 pm
- Location: USA,Hawaii,Honolulu(Seriously)
I don't want to be a jerk, but isn't it considered bad practice to have code within your header files? Actually, won't your linker give you problems ("More than one symbol declared as X", "Symbol already declared", or something along those lines), if you try to link more than one object with it included?
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
Hm....seems like a simple mess-up.
I will give you this: Sometimes..(sometimes)..you miss simple things.
But try to figure it out.
-JL
I will give you this: Sometimes..(sometimes)..you miss simple things.
But try to figure it out.
-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io