Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile warnings, cant determine hash #2142

Closed
Aerstme opened this issue May 12, 2017 · 3 comments
Closed

Compile warnings, cant determine hash #2142

Aerstme opened this issue May 12, 2017 · 3 comments
Labels
component:core A fault that lies within the main framework of rAthena priority:low A fault that affects rAthena in one piece of functionality and is self-contained type:bug Issue that is a bug within rAthena

Comments

@Aerstme
Copy link

Aerstme commented May 12, 2017

  • Client Date: 20150513
  • Server Mode: Renewal
  • OS: Ubuntu 16.04.2 -32 bits
  • gcc: 5.4.0
    Cant determine hash version, but I updated this day: 12-05-2017

Result: I updated the emulator and the database, but while compiling the script.c gives me errors
Modifications that may affect results: no important modifications

script.c: In function ‘script_getitem_randomoption’:
script.c:6730:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   it->option[i].id = (short)__64BPRTSIZE(get_val2(st,reference_uid(opt_id_id,opt_id_idx+i),opt_id_ref));
                      ^
script.c:6732:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   it->option[i].value = (short)__64BPRTSIZE(get_val2(st,reference_uid(opt_val_id,opt_val_idx+i),opt_val_ref));
                         ^
script.c:6734:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   it->option[i].param = (char)__64BPRTSIZE(get_val2(st,reference_uid(opt_param_id,opt_param_idx+i),opt_param_ref));

`

@Aerstme
Copy link
Author

Aerstme commented May 19, 2017

This issue is a 32 bit system related. I tested on a 64 bit and 32 system (Ubuntu 16.04), but only on 32 bit the error appears.

@Aerstme Aerstme changed the title Compile warnings Compile warnings, cant determine hash May 24, 2017
@danielbernard
Copy link
Contributor

danielbernard commented Aug 11, 2017

This is likely this version of the file:

it->option[i].id = (short)__64BPRTSIZE(get_val2(st,reference_uid(opt_id_id,opt_id_idx+i),opt_id_ref));

Current version points to this line:

it->option[i].id = (short)__64BPRTSIZE(get_val2(st,reference_uid(opt_id_id,opt_id_idx+i),opt_id_ref));

I don't have a 32-bit system to test compile on, but based on line:

#define __64BPRTSIZE(y) (intptr)y

The __64BPTRSIZE function hasn't changed in a long while.

@Jeybla Jeybla added component:core A fault that lies within the main framework of rAthena priority:low A fault that affects rAthena in one piece of functionality and is self-contained type:bug Issue that is a bug within rAthena labels Oct 7, 2017
@Lemongrass3110
Copy link
Member

This seems to have been fixed meanwhile.
Unable to reproduce this on the same machine settings and with script.cpp anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:core A fault that lies within the main framework of rAthena priority:low A fault that affects rAthena in one piece of functionality and is self-contained type:bug Issue that is a bug within rAthena
Projects
None yet
Development

No branches or pull requests

4 participants