public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "msebor at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug build/18755] New: build errors with -DNDEBUG
Date: Sat, 01 Aug 2015 17:36:00 -0000	[thread overview]
Message-ID: <bug-18755-131@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=18755

            Bug ID: 18755
           Summary: build errors with -DNDEBUG
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: msebor at redhat dot com
                CC: carlos at redhat dot com
  Target Milestone: ---

The top of trunk (commit fddb87425a25aeb6e937496c4952c9bf3d8bb673) fails to
build when the NDEBUG macro is defined due to the following errors:

$ grep "error: " make.log  | grep -v "No such " | sort -u
../iconv/skeleton.c:678:16: error: variable ‘nstatus’ set but not used
[-Werror=unused-but-set-variable]
nscd.c:662:11: error: unused variable ‘ret’ [-Werror=unused-variable]
nscd.c:694:7: error: unused variable ‘ret’ [-Werror=unused-variable]
../sysdeps/nptl/gai_misc.h:108:7: error: variable ‘sigerr’ set but not used
[-Werror=unused-but-set-variable]
../sysdeps/nptl/gai_misc.h:84:7: error: unused variable ‘sigerr’
[-Werror=unused-variable]

A simple patch was posted here:
https://sourceware.org/ml/libc-alpha/2015-07/msg00507.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.
>From glibc-bugs-return-28963-listarch-glibc-bugs=sources.redhat.com@sourceware.org Sat Aug 01 18:16:54 2015
Return-Path: <glibc-bugs-return-28963-listarch-glibc-bugs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-glibc-bugs@sources.redhat.com
Received: (qmail 110679 invoked by alias); 1 Aug 2015 18:16:54 -0000
Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <glibc-bugs.sourceware.org>
List-Subscribe: <mailto:glibc-bugs-subscribe@sourceware.org>
List-Post: <mailto:glibc-bugs@sourceware.org>
List-Help: <mailto:glibc-bugs-help@sourceware.org>, <http://sourceware.org/lists.html#faqs>
Sender: glibc-bugs-owner@sourceware.org
Delivered-To: mailing list glibc-bugs@sourceware.org
Received: (qmail 110505 invoked by uid 48); 1 Aug 2015 18:16:50 -0000
From: "msebor at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug stdio/18756] New: fmemopen succeeds when size is zero
Date: Sat, 01 Aug 2015 18:16:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: glibc
X-Bugzilla-Component: stdio
X-Bugzilla-Version: 2.21
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: msebor at redhat dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at sourceware dot org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone
Message-ID: <bug-18756-131@http.sourceware.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://sourceware.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-08/txt/msg00003.txt.bz2
Content-length: 1076

https://sourceware.org/bugzilla/show_bug.cgi?id\x18756

            Bug ID: 18756
           Summary: fmemopen succeeds when size is zero
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: stdio
          Assignee: unassigned at sourceware dot org
          Reporter: msebor at redhat dot com
  Target Milestone: ---

POSIX specifies the fmemopen() function shall fail with EINVAL when the size
argument specifies a buffer size of zero. When compiled with the top of trunk,
the program below aborts indicating that glibc fails to conform to this
requirement.

#include <assert.h>
#include <errno.h>
#include <stdio.h>

int main (void)
{
    char c = 0;
    FILE *f = fmemopen (&c, 0, "w");
    printf ("%p, errno = %m\n", f);
    assert (f == 0 && errno == EINVAL);
    return 0;
}
0x100002f0040, errno = Success
a.out: /build/tmp/t.c:10: main: Assertion `f == 0 && (*__errno_location ()) =22' failed.

--
You are receiving this mail because:
You are on the CC list for the bug.


                 reply	other threads:[~2015-08-01 17:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-18755-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).