Issue information

Issue ID
#5112
Status
Fixed
Severity
Low
Started
Hercules Elf Bot
Dec 10, 2011 2:22
Last Post
Hercules Elf Bot
May 4, 2012 6:18
Confirmation
Yes (3)
No (0)

Hercules Elf Bot - Dec 10, 2011 2:22

Originally posted by [b]Jguy[/b]
[codebox]
utils.c: In function ‘WriteDump’:
utils.c:48:4: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
utils.c:55:3: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
grfio.c: In function ‘grfio_entryread’:
grfio.c:510:7: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
grfio.c:524:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
grfio.c:585:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
grfio.c:597:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
grfio.c: In function ‘grfio_reads’:
grfio.c:421:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
grfio.c:442:9: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
npc.c: In function ‘npc_event_export’:
npc.c:269:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
npc.c: In function ‘npc_timerevent_import’:
npc.c:445:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
npc.c: In function ‘npc_convertlabel_db’:
npc.c:2071:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
script.c: In function ‘parse_syntax’:
script.c:1404:53: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c:1406:50: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c:1629:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c: In function ‘parse_script’:
script.c:2172:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c: In function ‘get_val’:
script.c:2339:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c:2347:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c:2401:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c:2401:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
script.c:2409:41: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c:2409:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
script.c: In function ‘get_val2’:
script.c:2432:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c: In function ‘set_reg’:
script.c:2459:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c:2461:33: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c:2470:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c:2472:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c:2481:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
script.c:2510:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c:2512:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c:2512:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c:2522:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c:2524:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c:2524:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c: In function ‘script_free_vars’:
script.c:2773:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
script.c: In function ‘script_stop_sleeptimers’:
script.c:3304:53: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c: In function ‘run_script_timer’:
script.c:3346:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
script.c: In function ‘run_script_main’:
script.c:3551:28: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c: In function ‘script_cleararray_pc’:
script.c:3702:43: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
script.c: In function ‘script_setarray_pc’:
script.c:3734:42: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
script.c: In function ‘buildin_input’:
script.c:4883:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c: In function ‘buildin_set’:
script.c:4929:26: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c: In function ‘getarraysize’:
script.c:4960:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
script.c: In function ‘buildin_setarray’:
script.c:5022:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c: In function ‘buildin_cleararray’:
script.c:5071:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c: In function ‘buildin_getmapxy’:
script.c:12171:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c:12182:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c: In function ‘buildin_sprintf’:
script.c:12974:9: warning: format not a string literal and no format arguments [-Wformat-security]
script.c: In function ‘buildin_sscanf’:
script.c:13158:52: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c: In function ‘buildin_setd’:
script.c:13523:35: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c: In function ‘buildin_query_sql_sub’:
script.c:13615:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c: In function ‘buildin_searchitem’:
script.c:14101:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
script.c: In function ‘buildin_awake’:
script.c:14569:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
skill.c: In function ‘skill_name2id’:
skill.c:91:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
skill.c: In function ‘skill_parse_row_skilldb’:
skill.c:13894:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
mapreg_sql.c: In function ‘mapreg_readreg’:
mapreg_sql.c:27:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
mapreg_sql.c: In function ‘mapreg_setreg’:
mapreg_sql.c:45:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
mapreg_sql.c: In function ‘script_load_mapreg’:
mapreg_sql.c:137:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
mapreg_sql.c: In function ‘script_save_mapreg’:
mapreg_sql.c:162:129: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast][/codebox]

Compiled on....

[code]
jguy@leviathan:~/trunk$ uname -a
Linux leviathan 3.0.0-12-server #20-Ubuntu SMP Fri Oct 7 16:36:30 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
[/code]
(Ubuntu Server 11.10 64bit in a VMWare VM)

with:

[code]
./configure --enable-64bit --with-mysql
[/code]

This post has been edited by Jguy on Dec 10, 2011 2:23

Hercules Elf Bot - Dec 10, 2011 2:47

Originally posted by [b]Ind[/b]
lovely stuff. most script.c ones are related to this http://rathena.org/board/tracker/issue-5113-npc-engine-performance-issue/

Hercules Elf Bot - Dec 12, 2011 13:49

Originally posted by [b]xazax[/b]
You only need to swap the types of some int to intptr.

Hercules Elf Bot - Apr 15, 2012 12:48

Originally posted by [b]Ind[/b]
Fixed by [rev=15862], [rev=15863] and [rev=15864]