Package: util-linux
Version: 2.13.1.1-1
Severity: wishlist
Tags: patch

Hi,

compiling hwclock.o with additional compiler options, the compiler warns
about some flaws.

Without the patch:

% make hwclock.o
gcc -DHAVE_CONFIG_H -I. -I..  -include ../config.h -I../include 
-DLOCALEDIR=\"/usr/share/locale\"  -fsigned-char -O2 -fPIC -fPIE -Wall 
-Wformat=2 -Wunused       -Wundef -Wextra -Wswitch-enum -Wshadow 
-Wpointer-arith -Wcast-qual       -Wcast-align -Wwrite-strings -Wconversion 
-D_FORTIFY_SOURCE=2 -fstack-protector -Wbad-function-cast -Wnested-externs -MT 
hwclock.o -MD -MP -MF .deps/hwclock.Tpo -c -o hwclock.o hwclock.c
hwclock.c:96: warning: initialization discards qualifiers from pointer target 
type
hwclock.c: In function ‘time_inc’:
hwclock.c:204: warning: conversion to ‘__suseconds_t’ from ‘double’ may alter 
its value
hwclock.c:208: warning: conversion to ‘__suseconds_t’ from ‘double’ may alter 
its value
hwclock.c:211: warning: conversion to ‘__suseconds_t’ from ‘double’ may alter 
its value
hwclock.c: In function ‘hw_clock_is_utc’:
hwclock.c:220: warning: declaration of ‘adjtime’ shadows a global declaration
/usr/include/sys/time.h:87: warning: shadowed declaration is here
hwclock.c: In function ‘read_adjtime’:
hwclock.c:269: warning: passing argument 1 of ‘outsyserr’ discards qualifiers 
from pointer target type
clock.h:30: note: expected ‘char *’ but argument is of type ‘const char *’
hwclock.c: In function ‘set_hardware_clock_exact’:
hwclock.c:523: warning: cast from function call of type ‘double’ to 
non-matching type ‘int’
hwclock.c:538: warning: conversion to ‘float’ from ‘double’ may alter its value
hwclock.c: In function ‘display_time’:
hwclock.c:564: warning: initialization discards qualifiers from pointer target 
type
hwclock.c:568: warning: format not a string literal, format string not checked
hwclock.c: In function ‘calculate_adjustment’:
hwclock.c:851: warning: declaration of ‘debug’ shadows a global declaration
hwclock.c:137: warning: shadowed declaration is here
hwclock.c: In function ‘save_adjtime’:
hwclock.c:884: warning: declaration of ‘adjtime’ shadows a global declaration
/usr/include/sys/time.h:87: warning: shadowed declaration is here
hwclock.c:914: warning: passing argument 1 of ‘outsyserr’ discards qualifiers 
from pointer target type
clock.h:30: note: expected ‘char *’ but argument is of type ‘const char *’
hwclock.c:919: warning: passing argument 1 of ‘outsyserr’ discards qualifiers 
from pointer target type
clock.h:30: note: expected ‘char *’ but argument is of type ‘const char *’
hwclock.c:924: warning: passing argument 1 of ‘outsyserr’ discards qualifiers 
from pointer target type
clock.h:30: note: expected ‘char *’ but argument is of type ‘const char *’
hwclock.c: In function ‘manipulate_clock’:
hwclock.c:1048: warning: declaration of ‘adjtime’ shadows a global declaration
/usr/include/sys/time.h:87: warning: shadowed declaration is here
hwclock.c: In function ‘manipulate_epoch’:
hwclock.c:1139: warning: unused parameter ‘getepoch’
hwclock.c:1139: warning: unused parameter ‘setepoch’
hwclock.c:1140: warning: unused parameter ‘epoch_opt’
hwclock.c:1140: warning: unused parameter ‘testing’
mv -f .deps/hwclock.Tpo .deps/hwclock.Po


With the patch:
% make hwclock.o
gcc -DHAVE_CONFIG_H -I. -I..  -include ../config.h -I../include 
-DLOCALEDIR=\"/usr/share/locale\"  -fsigned-char -O2 -fPIC -fPIE -Wall 
-Wformat=2 -Wunused       -Wundef -Wextra -Wswitch-enum -Wshadow 
-Wpointer-arith -Wcast-qual       -Wcast-align -Wwrite-strings -Wconversion 
-D_FORTIFY_SOURCE=2 -fstack-protector -Wbad-function-cast -Wnested-externs -MT 
hwclock.o -MD -MP -MF .deps/hwclock.Tpo -c -o hwclock.o hwclock.c
hwclock.c: In function ‘display_time’:
hwclock.c:586: warning: ‘%c’ yields only last 2 digits of year in some locales
hwclock.c: In function ‘calculate_adjustment’:
hwclock.c:869: warning: declaration of ‘debug’ shadows a global declaration
hwclock.c:138: warning: shadowed declaration is here
hwclock.c: In function ‘manipulate_epoch’:
hwclock.c:1157: warning: unused parameter ‘getepoch’
hwclock.c:1157: warning: unused parameter ‘setepoch’
hwclock.c:1158: warning: unused parameter ‘epoch_opt’
hwclock.c:1158: warning: unused parameter ‘testing’
mv -f .deps/hwclock.Tpo .deps/hwclock.Po

Bye, Jörg.

-- System Information:
Debian Release: unstable/experimental
  APT prefers unstable
  APT policy: (900, 'unstable'), (700, 'experimental')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.29
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to de_DE.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages util-linux depends on:
ii  libc6                  2.9-12            GNU C Library: Shared libraries
ii  libncurses5            5.7+20090510-1    shared libraries for terminal hand
ii  libselinux1            2.0.71-1          SELinux shared libraries
ii  libslang2              2.1.4-3           The S-Lang programming library - r
ii  libuuid1               1.41.5-1          universally unique id library
ii  lsb-base               3.2-22            Linux Standard Base 3.2 init scrip
ii  tzdata                 2009g-1           time zone and daylight-saving time
ii  zlib1g                 1:1.2.3.3.dfsg-13 compression library - runtime

util-linux recommends no packages.

Versions of packages util-linux suggests:
ii  dosfstools                    3.0.2-1    utilities for making and checking 
ii  kbd                           1.15-1     Linux console font and keytable ut
pn  util-linux-locales            <none>     (no description available)

-- no debconf information

Attachment: signature.asc
Description: Digital signature http://en.wikipedia.org/wiki/OpenPGP

Reply via email to