We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3635 - Compilation warning with gcc -Wsign-conversion
Summary: Compilation warning with gcc -Wsign-conversion
Status: RESOLVED ABANDONED
Alias: None
Product: SDL
Classification: Unclassified
Component: main (show other bugs)
Version: HG 2.0
Hardware: x86 Linux
: P2 minor
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-21 23:12 UTC by camilledesvernois
Modified: 2018-08-06 21:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description camilledesvernois 2017-04-21 23:12:05 UTC
When compiling my project I get the following warning coming from SDL code:

In file included from /usr/local/include/SDL2/SDL_main.h:25:0,
                 from /usr/local/include/SDL2/SDL.h:65,
                 from main.c:4:
/usr/local/include/SDL2/SDL_stdinc.h: In function ‘SDL_memset4’:
/usr/local/include/SDL2/SDL_stdinc.h:272:19: warning: conversion to ‘Uint32 {aka unsigned int}’ from ‘int’ may change the sign of the result [-Wsign-conversion]
     Uint32 _val = (val);
                   ^

I tried the simple fix of adding an explicit cast to (Uint32) and it removed the warning, but it may be worth taking a look at it ?
Comment 1 Ryan C. Gordon 2017-08-09 05:25:35 UTC
(Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.)

Tagging a bunch of bugs as target-2.0.6.

This means we're in the final stretch for an official SDL 2.0.6 release! These are the bugs we really want to fix before shipping if humanly possible.

That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.6 release, and generally be organized about what we're aiming to ship. After some debate, we might just remove this tag again and deal with it for a later release.

Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment.

Thanks!
--ryan.
Comment 2 Sam Lantinga 2017-08-10 03:29:05 UTC
"val" should already be a Uint32:
void SDL_memset4(void *dst, Uint32 val, size_t dwords)

Can you confirm that this is the case in your header, or has this been fixed since then?
Comment 3 Ryan C. Gordon 2018-08-06 21:20:21 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.