26 Dec, 2008, Venrexx wrote in the 1st comment:
Votes: 0
Hello I am looking for some help fixing my compile, I am sure alot of you will find it easy as pie.
————————————–
I get the following warnings in compile from save.c
————————————–
save.c:3061: warning: comparisons like X<=Y<=Z do not have their mathematical meaning
save.c:3063: warning: comparisons like X<=Y<=Z do not have their mathematical meaning
save.c:3065: warning: comparisons like X<=Y<=Z do not have their mathematical meaning
save.c:3067: warning: comparisons like X<=Y<=Z do not have their mathematical meaning
Pastebin Link to save.c:
http://www.mudbytes.net/index.php?a=past...
————————————–
I get the following warnings in ident.c
————————————–
ident.c: In function 'set_auth':
ident.c:312: warning: pointer targets in passing argument 3 of 'getsockname' differ in signedness
ident.c:317: warning: pointer targets in passing argument 3 of 'getpeername' differ in signedness
Pastebin Link to ident.c:
http://www.mudbytes.net/index.php?a=past...
————————————–
I get the following warnings in grub.c
————————————–
grub.c:23: warning: conflicting types for built-in function 'trunc'
Pastebin link to grub.c:
http://www.mudbytes.net/index.php?a=past...
————————————–
I get the following warnings in comm.c
————————————–
comm.c: In function 'new_descriptor':
comm.c:1015: warning: pointer targets in passing argument 3 of 'accept' differ in signedness
Pastebin link to comm.c:
http://www.mudbytes.net/index.php?a=past...

I fixed the rest of the warnings, took awhile but these are all that remain and I would like to have them resolved ASAP so I may get them out of the way and continue with my progress. Any snippets I listed are available for use. I will edit this when they have all been fixed and reposted in the pastebin. Thank you for any or all help provided.
26 Dec, 2008, David Haley wrote in the 2nd comment:
Votes: 0
Let's try to figure out what these warnings are telling you. Starting with the first one: what does "a < b < c" mean in C? When you evaluate the expression "a < b", what is the return type you get? What happens when you compare that in the expression "< c"?

Next: differing in signedness. This means that a function expects a number of one sign, and you are giving it a different sign.

Differing types for a built-in means that somebody has redefined the function; the compiler gets unhappy when you do that. It should suffice to rename the redefinition in addition to all uses of it. Better yet, see how the redefinition differs from the built-in.

Too many arguments for format should be self-explanatory. You have a printf statement of the form "…%s…" and you have passed in more arguments than you have format specifiers.
26 Dec, 2008, Igabod wrote in the 3rd comment:
Votes: 0
the link to comm.c is missing everything past line 2019 so the errors with the nanny function can't be seen. Thats pretty much the only one I can help you with too. Btw, why did you post this on two different threads? You'd be better off just sticking with one thread.
26 Dec, 2008, Venrexx wrote in the 4th comment:
Votes: 0
I thought this WAS the only thread I posted it on. I figured I would add it all to 1 thread but if I have another one open too then I am sorry for that. As for the File, it is a long file so it would not accept it all. I will cut it down so you can ready the important lines.
26 Dec, 2008, Igabod wrote in the 5th comment:
Votes: 0
your other thread is here I think samson moved it cause you originally posted it in the wrong area.
26 Dec, 2008, Venrexx wrote in the 6th comment:
Votes: 0
Oh my appologies I really had no idea of that, next time I will think about it before I post.
26 Dec, 2008, David Haley wrote in the 7th comment:
Votes: 0
Thinking before posting is indeed usually a good idea! :wink:
26 Dec, 2008, Igabod wrote in the 8th comment:
Votes: 0
actually it doesn't require much thought at all, just go to the home page and look at recent posts on the left-hand side of the screen, you'll see your previous post over there as well as this one. And if it happens to have been knocked off that list just look in the top right corner of the forums page or this page and click the recent posts link there to see the last 20 (I think) posts. Anyway, did you get that comm.c file trimmed to the important areas? Make sure you give us at least 10 - 15 lines above and below the lines that there's a problem on, or if possible, the entire function that has the problem.
26 Dec, 2008, David Haley wrote in the 9th comment:
Votes: 0
Don't really need any context here, the warnings are pretty clear from the warning text. Don't mix signedness, and don't give too many args to printf.
26 Dec, 2008, Venrexx wrote in the 10th comment:
Votes: 0
Ok I will keep all that in mind, again I am sorry, I am still kinda new here so I do not know the site all that well yet.
26 Dec, 2008, Igabod wrote in the 11th comment:
Votes: 0
that may be helpful advice to some people, but others need a little clearer advice so they can learn. I know the first time I came across a "too many args" warning I couldn't figure out which arguments were extraneous and which needed to be there. Just saying "oh hey there's too many arguments" won't help a person who has no idea what an argument is or what a sprintf is supposed to look like. Not that I'm saying venrexx doesn't know these things, I'm just trying to cover the bases here just in case he doesn't.

[edit cause venrexx posted while I was typing this] No worries venrexx, now you know about those nifty features, I was here several months before I learned of them.
26 Dec, 2008, David Haley wrote in the 12th comment:
Votes: 0
My point is that the context will not be helpful, in this case only the lines in question matter. There's no point in having people sift through the entire file.
26 Dec, 2008, Venrexx wrote in the 13th comment:
Votes: 0
Ok I will edit this post.
26 Dec, 2008, David Haley wrote in the 14th comment:
Votes: 0
Actually, please just make new posts, editing posts gets pretty confusing unless it's fixing a real mistake…
26 Dec, 2008, Igabod wrote in the 15th comment:
Votes: 0
DavidHaley said:
My point is that the context will not be helpful, in this case only the lines in question matter. There's no point in having people sift through the entire file.


I'm not saying anything about sifting through the entire file, I specifically asked for the 10-15 above and below the lines in question cause in some codes you'll have what should be one line in 5 or 6 lines. I know that in low4 I've found shit like this:

act("You have %s out of %s hp and %s out of %s mana",
ch->hit,
ch->max_hit,
ch->move,
ch->max_move,
ch->mana,
ch->max_mana);


so in that example the warnings would point to the lines with ch->mana and ch->max_mana as the errors but the error is really with the ch->move and ch->max_move. You need to see the lines above that to know that you only want the hp and mana args in there. I can't tell him this if all he shows me is the line with the act() and leaves out the args.

[edit to add cause david posted while i was typing this out] by make a new post he doesn't mean a new thread, just to clarify.
26 Dec, 2008, Venrexx wrote in the 16th comment:
Votes: 0
Well technically it is fixing real mistakes lol, sorry I did not read your post until I had already edited the paste bin files, all warnings listed are still needing to be fixed, I removed the 2 that I had already fixed. I hoope this will not be an issue, I just want to get these things fixed.
26 Dec, 2008, David Haley wrote in the 17th comment:
Votes: 0
Generally the best way to get help quickly is to make it as easy as possible to see where the problems are, which usually doesn't mean clicking on links and the like. :wink:
26 Dec, 2008, Venrexx wrote in the 18th comment:
Votes: 0
Well those links lead to pastebin, I have put notes by the lines at fault and only posted small fragments as requested so it is alot easier to locate (and hopefully solve) the issue.
26 Dec, 2008, Igabod wrote in the 19th comment:
Votes: 0
btw, have you checked your other thread yet? I think cratylus told you how to fix one of the problems with a size_t or something like that. There may also be another fix in there as well from somebody else but I wasn't reading it that intently.
26 Dec, 2008, Igabod wrote in the 20th comment:
Votes: 0
and from what it looks like, your ident.c problem was fixed in the other thread as well. I think (i'm not sure but i think) that you can fix those two simply by changing the ulen to len and the tlen to len but I'm totally unfamiliar with your codebase and i'm not exactly a trained programmer, just a hobbyist.
0.0/33