Bug 201285 - tools/regression/lib/libc/nss/test-getaddr.c:450: possible missing break ?
Summary: tools/regression/lib/libc/nss/test-getaddr.c:450: possible missing break ?
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: 10.1-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: Christian Brueffer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-02 16:15 UTC by David Binderman
Modified: 2015-07-22 15:58 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2015-07-02 16:15:21 UTC
tools/regression/lib/libc/nss/test-getaddr.c:452]: (warning) Variable 'ai_family' is reassigned a value before the old one has been used. 'break;' missing?

        switch (c) {
        case '4':
            hints.ai_family = PF_INET;
        case '6':
            hints.ai_family = PF_INET6;
            break;
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-07-14 15:25:29 UTC
A commit references this bug:

Author: brueffer
Date: Tue Jul 14 15:24:51 UTC 2015
New revision: 285543
URL: https://svnweb.freebsd.org/changeset/base/285543

Log:
  Add a missing break statement, which made the code default to IPv6.

  PR:		201285
  Submitted by:	David Binderman
  MFC after:	1 week

Changes:
  head/tools/regression/lib/libc/nss/test-getaddr.c
Comment 2 Christian Brueffer freebsd_committer freebsd_triage 2015-07-14 15:33:50 UTC
Fixed in HEAD, MFC pending.  Thanks (and sorry for misspelling your name in the previous commits)!
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-07-22 15:40:09 UTC
A commit references this bug:

Author: brueffer
Date: Wed Jul 22 15:39:42 UTC 2015
New revision: 285795
URL: https://svnweb.freebsd.org/changeset/base/285795

Log:
  MFC: r285543

  Add a missing break statement, which made the code default to IPv6.

  PR:		201285
  Submitted by:	David Binderman
  Approved by:	re (gjb)

Changes:
_U  stable/10/
  stable/10/tools/regression/lib/libc/nss/test-getaddr.c
Comment 4 Christian Brueffer freebsd_committer freebsd_triage 2015-07-22 15:58:18 UTC
Merge done, thanks!