Jump to content
  • 0

Warning compiling char_clif.cpp


Question

Posted

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

5 answers to this question

Recommended Posts

  • 0
Posted (edited)

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
  • 0
Posted

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?

  • 0
Posted
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?

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...