SlashGeeGee Posted August 23, 2012 Group: Members Topic Count: 111 Topics Per Day: 0.02 Content Count: 573 Reputation: 20 Joined: 11/19/11 Last Seen: October 24, 2014 Share Posted August 23, 2012 Hello rA I just updated my svn to the latest today and when i compiled I experience this error when compiling. Here it is : 3>c:\ragnarok files\rathena\src\char\inter.c(393): warning C4101: 'stack_buffer' : unreferenced local variable I checked line 393 in my inter.c here's what I found : const char* geoip_getcountry(uint32 ipnum){ int depth; unsigned int x; unsigned char stack_buffer[6]; // <-- Line 393. const unsigned char *buf; unsigned int offset = 0; for (depth = 31; depth >= 0; depth--) { buf = geoip_cache + (long)6 *offset; if (ipnum & (1 << depth)) { /* Take the right-hand branch */ x = (buf[3*1 + 0] << (0*8)) + (buf[3*1 + 1] << (1*8)) + (buf[3*1 + 2] << (2*8)); } else { /* Take the left-hand branch */ x = (buf[3*0 + 0] << (0*8)) + (buf[3*0 + 1] << (1*8)) + (buf[3*0 + 2] << (2*8)); } if (x >= 16776960) { x=x-16776960; return geoip_countryname[x]; } offset = x; } return geoip_countryname[0]; } Please help on how to fix this error Thanks in Advance SlashGeeGee Quote Link to comment Share on other sites More sharing options...
JoWei Posted August 23, 2012 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 117 Reputation: 18 Joined: 01/06/12 Last Seen: April 1, 2021 Share Posted August 23, 2012 (edited) I guess you can just comment it out, I think it was a line that was forgotten during clean up. Right now my server is running fine without it and also it seems the variable isn't used elsewhere anyways. Edited August 23, 2012 by JoWei Quote Link to comment Share on other sites More sharing options...
SlashGeeGee Posted August 23, 2012 Group: Members Topic Count: 111 Topics Per Day: 0.02 Content Count: 573 Reputation: 20 Joined: 11/19/11 Last Seen: October 24, 2014 Author Share Posted August 23, 2012 I guess you can just comment it out, I think it was a line that was forgotten during clean up. Right now my server is running fine without it and also it seems the variable isn't used elsewhere anyways. i'll just comment out line 393 ? Quote Link to comment Share on other sites More sharing options...
malufett Posted August 23, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 554 Reputation: 70 Joined: 04/04/12 Last Seen: November 8, 2013 Share Posted August 23, 2012 yup you can delete it or comment it out..the warning was cause by a variable that hasn't been used.. Quote Link to comment Share on other sites More sharing options...
Question
SlashGeeGee
Hello rA
I just updated my svn to the latest today and when i compiled I experience this error when compiling.
Here it is :
I checked line 393 in my inter.c here's what I found :
Please help on how to fix this error
Thanks in Advance
SlashGeeGee
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.