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

Stringbuf warning when compiling #8177

Closed
reunite-ro opened this issue Mar 20, 2024 · 5 comments · Fixed by #8384
Closed

Stringbuf warning when compiling #8177

reunite-ro opened this issue Mar 20, 2024 · 5 comments · Fixed by #8384
Labels
type:bug Issue that is a bug within rAthena

Comments

@reunite-ro
Copy link
Contributor

rAthena Hash

5ebfd54

Client Date

not related

Server Mode

Pre-Renewal

Result

make[1]: Entering directory `/root/rathena/src/common'
MKDIR obj
CXX core.cpp
CXX socket.cpp
CXX timer.cpp
CXX db.cpp
CXX nullpo.cpp
CXX malloc.cpp
CXX showmsg.cpp
CXX strlib.cpp
strlib.cpp: In function ‘size_t _StringBuf_Vprintf(const char*, int, const char*, StringBuf*, const char*, __va_list_tag*)’:
strlib.cpp:1015:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if( n > -1 && n < size )
~~^~~~~~
CXX utils.cpp

Relevant Log Output

No response

Expected Result

Maybe no warning if possible.

How to Reproduce

Recompile in Centos 7 environment, didnt tried yet with Ubuntu.

Official Information

not related

Modifications that may affect results

No response

@reunite-ro reunite-ro added the type:bug Issue that is a bug within rAthena label Mar 20, 2024
@admkakaroto
Copy link
Contributor

Some in Windows VS Commpiler.

@srogm
Copy link

srogm commented May 21, 2024

Seeing this on Debain as well.
warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned int'} [-Wsign-compare]

@gmragnarok
Copy link

i have same issue

OS Configuration

CentOS Linux release 7.9.2009 (Core)
gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)

Result

        CXX     showmsg.cpp
        CXX     strlib.cpp
strlib.cpp: In function ‘size_t _StringBuf_Vprintf(const char*, int, const char*, StringBuf*, const char*, __va_list_tag*)’:
strlib.cpp:1014:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if( n > -1 && n < size )
                 ~~^~~~~~
        CXX     utils.cpp
        CXX     utilities.cpp

@Daegaladh
Copy link
Member

Seems my PR works fine on Ubuntu
Could someone try on CentOS?

@aleos89
Copy link
Contributor

aleos89 commented May 28, 2024

I tested on an old CentOS 7 (gcc 7.3.1) I have and it compiled with no warnings.

@Daegaladh Daegaladh linked a pull request May 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Issue that is a bug within rAthena
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants