Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
eo287540012yStack Overflow wouldn’t have been invented if C had better error messages.
That’s why Python recently had a big update on their error messages -
Parzi88332y@eo2875 Python was usually on the ball, though, I'd say 98% of the time it knew the actual issue. This is very much not.
-
Parzi88332y@cuddlyogre No. These are between a function's prototype and its actual declaration, not between two header files. This is my issue, and I don't have the slightest where to even begin. ALL my functions throw these, despite being perfectly fine and valid outside this specific context.
-
Parzi88332y@cuddlyogre turns out, it's the "-rc1" part that's the issue. legacy projects suck, especially when you have to rebase because someone picked a beta kernel that's got broken header files.
-
I know this post is pretty old by now, but for future debugging, try to generate a preprocessed output by adding "-E -P" to your GCC CLI arguments and then compile that to see where the issue is, sometime the error would be more accurate and actually points you to the right spot.
-
Parzi88332y@BlackCenti Noted, but unfortunately, i'm using Buildroot, so I don't have direct control of the flags.
Related Rants
-
gururaju53*Now that's what I call a Hacker* MOTHER OF ALL AUTOMATIONS This seems a long post. but you will definitely ...
-
linuxxx65This guy at my last internship. A windows fanboy to the fucking max! He was saying how he'd never use anythi...
-
creedasaurus60Another dev on my team just got a new machine. Before he came in today I made two separate USB installers and ...
I have, once again, figured out why I keep dropping C as a language. The answer is because the errors are incredibly unhelpful and actively want to implode your brain.
Examples currently being spat out by gcc for my driver:
`error: conflicting types for ‘block_read’; have ‘ssize_t(struct file *, char *, size_t, loff_t *)’ {aka ‘int(struct file *, char *, unsigned int, long long int *)’}`
`note: previous declaration of ‘block_read’ with type ‘ssize_t(struct file *, char *, size_t, loff_t *)’ {aka ‘int(struct file *, char *, unsigned int, long long int *)’}`
`error: initialization of ‘ssize_t (*)(struct file *, char *, size_t, loff_t *)’ {aka ‘int (*)(struct file *, char *, unsigned int, long long int *)’} from incompatible pointer type ‘ssize_t (*)(struct file *, char *, size_t, loff_t *)’ {aka ‘int (*)(struct file *, char *, unsigned int, long long int *)’}`
Go character by character for those types as listed, and tell me where they differ, because I can't find it.
rant
driver
linux
error
gcc
c