Jump to content
  • 0

Question

Posted

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 /no1

SlashGeeGee

3 answers to this question

Recommended Posts

Posted (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 by JoWei
Posted

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 ?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...