Jump to content
  • 0

Error when Compiling


SlashGeeGee

Question


  • Group:  Members
  • Topic Count:  111
  • Topics Per Day:  0.02
  • Content Count:  573
  • Reputation:   20
  • Joined:  11/19/11
  • Last Seen:  

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

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  117
  • Reputation:   18
  • Joined:  01/06/12
  • Last Seen:  

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
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  111
  • Topics Per Day:  0.02
  • Content Count:  573
  • Reputation:   20
  • Joined:  11/19/11
  • Last Seen:  

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 ?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  554
  • Reputation:   70
  • Joined:  04/04/12
  • Last Seen:  

yup you can delete it or comment it out..the warning was cause by a variable that hasn't been used..

:meow:

Link to comment
Share on other sites

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.

×
×
  • Create New...