Jump to content
  • 0

Warning compiling char_clif.cpp


CyberDevil

Question


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.02
  • Content Count:  242
  • Reputation:   37
  • Joined:  02/25/18
  • Last Seen:  

Today I have made an update/upgrade of my server of all the libraries etc. but when I re-compiled rAthena, I see this warning that I do not know how to solve:

make[1]: ingresso nella directory "/root/rAthena/src/char"
        MKDIR   obj
        CXX     char_clif.cpp
char_clif.cpp: In function int chclif_parse_pincode_setnew(int, char_session_data*)’:
char_clif.cpp:293:11: warning: char* strncpy(char*, const char*, size_t)’ specified bound depends on the length of the source argument [-Wstringop-overflow=]
    strncpy( sd->pincode, newpin, strlen( newpin ) );
    ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        CXX     char_cnslif.cpp
      	etc... etc.. etc...

The rAthena version is updated a few days ago and the server runs with Debian 9... any suggestions?

  • Upvote 1
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   8
  • Joined:  01/02/14
  • Last Seen:  

@CyberDevil, you can safely ignore those warnings unless it is affecting the actual intended behavior of the emulator. GCC-7 should be okay.

  • Like 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.02
  • Content Count:  242
  • Reputation:   37
  • Joined:  02/25/18
  • Last Seen:  

Update with this screenshot

image.png.60903b440c6ae04f3f27345d879ead3e.png

...and this other errors at the end of compiling:

Quote

scanner.h:208:17: warning: type of ‘libconfig_yy_scan_string’ does not match original declaration [-Wlto-type-mismatch]
scanner.c:1964:17: note: ‘libconfig_yy_scan_string’ was previously declared here
scanner.c:1964:17: note: code may be misoptimized unless -fno-strict-aliasing is used
scanner.h:202:6: warning: type of ‘libconfig_yy_delete_buffer’ does not match original declaration [-Wlto-type-mismatch]
scanner.c:1743:10: note: ‘libconfig_yy_delete_buffer’ was previously declared here
scanner.c:1743:10: note: code may be misoptimized unless -fno-strict-aliasing is used

image.png.d671bf38e1b38780aeaa1cf6d8dee2e9.png

 

Edited by CyberDevil
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.02
  • Content Count:  242
  • Reputation:   37
  • Joined:  02/25/18
  • Last Seen:  

I have downgrade and recompile from GCC-8 to GCC-7 and the first warning is gone... I have only got this warning now:

Quote

        CXX     unit.cpp
        CXX     vending.cpp
        LD      map-server
scanner.h:208:17: warning: type of ‘libconfig_yy_scan_string’ does not match original declaration [-Wlto-type-mismatch]
scanner.c:1964:17: note: ‘libconfig_yy_scan_string’ was previously declared here
scanner.c:1964:17: note: code may be misoptimized unless -fno-strict-aliasing is used
scanner.h:202:6: warning: type of ‘libconfig_yy_delete_buffer’ does not match original declaration [-Wlto-type-mismatch]
scanner.c:1743:10: note: ‘libconfig_yy_delete_buffer’ was previously declared here
scanner.c:1743:10: note: code may be misoptimized unless -fno-strict-aliasing is used
 

Do you think that by doing a downgrade from GCC-7 to GCC-6 I can solve or is it better to go directly to version 5?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.02
  • Content Count:  101
  • Reputation:   5
  • Joined:  12/04/16
  • Last Seen:  

On 2/25/2019 at 5:41 AM, CyberDevil said:

I have downgrade and recompile from GCC-8 to GCC-7 and the first warning is gone... I have only got this warning now:

Do you think that by doing a downgrade from GCC-7 to GCC-6 I can solve or is it better to go directly to version 5?

solved your problem?
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.02
  • Content Count:  242
  • Reputation:   37
  • Joined:  02/25/18
  • Last Seen:  

nope... I think this issue can solve with GCC-5 but it's no more important for me... the server work perfectly also with this warning!

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...