Jump to content
  • 0

SRC Compiling warning


iamkevin

Question


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  101
  • Reputation:   3
  • Joined:  09/15/16
  • Last Seen:  

I always encounter this kind of WARNING when i recompile my src.

 

battle.c:4362:22: warning: unused variable tstatus [-Wunused-variable]
  struct status_data *tstatus = status_get_status_data(target);
                      ^
battle.c: In function battle_calc_weapon_final_atk_modifiers’:
battle.c:4965:27: warning: unused variable sd [-Wunused-variable]
  struct map_session_data *sd = BL_CAST(BL_PC, src);

 

how to remove this warning?

and may i know what might be the possible impact of this warning in to my server? 

thank you!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

remove both line since its not used in the source mod that u created.

1 hour ago, iamkevin said:

struct status_data *tstatus = status_get_status_data(target); ^

 

1 hour ago, iamkevin said:

struct map_session_data *sd = BL_CAST(BL_PC, src);

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  101
  • Reputation:   3
  • Joined:  09/15/16
  • Last Seen:  

sir i am having problem with this again:

skill.c: In function skill_castend_nodamage_id’:
skill.c:7318:17: warning: declaration of i shadows a previous local [-Wshadow]
      int c = 0, i, d = 0;
                 ^
skill.c:5856:6: warning: shadowed declaration is here [-Wshadow]
  int i = 0;
      ^


 

Edited by iamkevin
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...