[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#774118: marked as done (libc6:amd64: strspn generates compiler warning)



Your message dated Tue, 30 Dec 2014 14:39:23 +0100
with message-id <20141230133923.GB17267@mail.waldi.eu.org>
and subject line Re: Bug#774118: Additional information
has caused the Debian Bug report #774118,
regarding libc6:amd64: strspn generates compiler warning
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
774118: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774118
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: libc6
Version: 2.13-38+deb7u4
Severity: normal

A compiler warning message is generated by the following
test code and compiler options.

irwin@raven> cat >test_strspn.c
#include <stdio.h>
#include <string.h>
int
main(void) {
  strcmp("  8998797857586fasdfljf", " ");
  strspn("  8998797857586fasdfljf", " ");
  strcspn("  8998797857586fasdfljf", " ");
  return 0;
}
^D
irwin@raven> gcc -O1 -Wconversion test_strspn.c
test_strspn.c: In function ‘main’:
test_strspn.c:6:3: warning: conversion to ‘long unsigned int’ from
‘int’ may change the sign of the result [-Wsign-conversion]

Note the warning message only occurs for line 6, and does not occur
for the very similar line 5 and line 7.  In particular, strcspn has
the exact same return type, argument types, and number of arguments as
strspn, yet strspn generates the warning while strcspn does not.
Therefore, I am pretty sure this warning is due to some difference in
how the strspn and strcspn arguments or returns are defined in libc6
when those should be absolutely identical between the two functions.
That difference (as well as the warning itself about transformation
from int to long unsigned int) is a cause for concern about the
reliability of strspn.  So I hope to see vigorous follow up. 

-- System Information:
Debian Release: 7.6
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libc6:amd64 depends on:
ii  libc-bin  2.13-38+deb7u4
ii  libgcc1   1:4.7.2-5

libc6:amd64 recommends no packages.

Versions of packages libc6:amd64 suggests:
ii  debconf [debconf-2.0]  1.5.49
ii  glibc-doc              2.13-38+deb7u4
ii  locales                2.13-38+deb7u4

-- debconf information:
  glibc/upgrade: true
  glibc/restart-services:
* libraries/restart-without-asking: false
  glibc/disable-screensaver:
  glibc/restart-failed:

--- End Message ---
--- Begin Message ---
On Sun, Dec 28, 2014 at 06:07:45PM -0800, Alan W. Irwin wrote:
> Apparently, this bug has already been fixed with a two-line patch in
> the upstream git version of glibc (see <http://sourceware.org/git/?p=glibc.git;a=commit;h=1a4b75a190006bb013a61f2031a4de86e93a629f).
> So if this fix has not already been propagated to the Debian unstable
> version of libc please apply it.

This problem is actually fixed in Jessie.  So I'm closing the bug report.

Bastian

-- 
Insults are effective only where emotion is present.
		-- Spock, "Who Mourns for Adonais?"  stardate 3468.1

--- End Message ---

Reply to: