develooper Front page | perl.perl5.porters | Postings from April 2010

[perl #74616] [PATCH] enum conversion warnings in pp_sys.c

Thread Next
From:
Robin Barker
Date:
April 24, 2010 01:26
Subject:
[perl #74616] [PATCH] enum conversion warnings in pp_sys.c
Message ID:
rt-3.6.HEAD-6227-1272038546-319.74616-75-0@perl.org
# New Ticket Created by  Robin Barker 
# Please include the string:  [perl #74616]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=74616 >


This is a bug report for perl from rmbarker@cpan.org
generated with the help of perlbug 1.39 running under perl 5.13.0.


-----------------------------------------------------------------
[Please describe your issue here]

I get a warning with gcc 4.5.0 from pp_sys.c

pp_sys.c: In function ‘Perl_pp_getpriority’:
pp_sys.c:4412:5: warning: enum conversion when passing argument 1 of ‘getpriority’ is invalid in C++
/usr/include/sys/resource.h:94:12: note: expected ‘__priority_which_t’ but argument is of type ‘int’

and a similar warning for Perl_pp_setpriority.

The patch fixes this by casting argument 1 to (__priority_which_t)

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=install
    severity=low
---
Site configuration information for perl 5.13.0:

Configured by robin at Thu Apr 22 12:22:28 BST 2010.

Summary of my perl5 (revision 5 version 13 subversion 0) configuration:
  Commit id: 866f9d6c33c5b1ed70962d63bad47d37c13139dc
  Platform:
    osname=linux, osvers=2.6.31-20-generic, archname=i686-linux-64int
    uname='linux spade-ubuntu 2.6.31-20-generic #58-ubuntu smp fri mar 12 05:23:09 utc 2010 i686 gnulinux '
    config_args='-des -Dcc=gcc -Duse64bitint -Doptimize=-O2 -g -Dusedevel -Dman3dir=none'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
    use64bitint=define, use64bitall=undef, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='gcc', ccflags ='-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2 -g',
    cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion='', gccversion='4.5.0', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=4, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/lib64
    libs=-lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=/lib/libc-2.10.1.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.10.1'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib -fstack-protector'

Locally applied patches:
    

---
@INC for perl 5.13.0:
    lib
    /usr/local/lib/perl5/site_perl/5.13.0/i686-linux-64int
    /usr/local/lib/perl5/site_perl/5.13.0
    /usr/local/lib/perl5/5.13.0/i686-linux-64int
    /usr/local/lib/perl5/5.13.0
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl 5.13.0:
    HOME=/home/robin
    LANG=en_GB.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/usr/lib:/usr/local/lib
    LOGDIR (unset)
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
    PERL_BADLANG (unset)
    SHELL=/bin/tcsh
Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About