classification
Title: importlib.h: suncc warnings
Type: behavior Stage: resolved
Components: Build Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: pitrou, python-dev, skrah
Priority: normal Keywords:

Created on 2012-06-25 12:00 by skrah, last changed 2012-06-25 15:53 by skrah. This issue is now closed.

Messages (6)
msg163954 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-06-25 12:00
suncc complains about negative values that are assigned to unsigned
char:

"Python/importlib.h", line 3634: warning: initializer does not fit or is out of range: -125
"Python/importlib.h", line 3635: warning: initializer does not fit or is out of range: -125
[...]
msg163984 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-06-25 15:36
New changeset 6dc9472346de by Antoine Pitrou in branch 'default':
Issue #15181: importlib bytecode is unsigned and shouldn't have negative numbers.
http://hg.python.org/cpython/rev/6dc9472346de
msg163985 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-06-25 15:36
It should be fixed now!
msg163987 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-06-25 15:47
+            fprintf(outfile, "%d,", (unsigned int) data[i]);

Hmm, "%u"? :)
msg163988 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-06-25 15:49
Le lundi 25 juin 2012 à 15:47 +0000, Stefan Krah a écrit :
> 
> +            fprintf(outfile, "%d,", (unsigned int) data[i]);
> 
> Hmm, "%u"? :)

It doesn't change anything, since data[i] is between 0 and 255.
(unless C `int` is 8 bits on your computer, but I doubt it :-))
msg163989 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-06-25 15:53
Antoine Pitrou <report@bugs.python.org> wrote:
> > +            fprintf(outfile, "%d,", (unsigned int) data[i]);
> > 
> > Hmm, "%u"? :)
> 
> It doesn't change anything, since data[i] is between 0 and 255.
> (unless C `int` is 8 bits on your computer, but I doubt it :-))

That's true, but we might get another compiler warning about that. No big
deal of course.
History
Date User Action Args
2012-06-25 15:53:02skrahsetmessages: + msg163989
2012-06-25 15:49:09pitrousetmessages: + msg163988
2012-06-25 15:47:22skrahsetmessages: + msg163987
2012-06-25 15:36:54pitrousetstatus: open -> closed

nosy: + pitrou
messages: + msg163985

resolution: fixed
stage: resolved
2012-06-25 15:36:27python-devsetnosy: + python-dev
messages: + msg163984
2012-06-25 12:00:25skrahcreate