SlashGeeGee Posted August 23, 2012 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
JoWei Posted August 23, 2012 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
SlashGeeGee Posted August 23, 2012 Author 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
malufett Posted August 23, 2012 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
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
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.