Bug 198437

Summary: Fix net/ladvd build with clang 3.6.0
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Po-Chuan Hsieh <sunpoet>
Status: Closed FIXED    
Severity: Affects Many People CC: sten
Priority: --- Flags: bugzilla: maintainer-feedback? (sten)
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 197395    
Attachments:
Description Flags
Remove unnecessary null checks none

Description Dimitry Andric freebsd_committer freebsd_triage 2015-03-08 21:34:13 UTC
Created attachment 154040 [details]
Remove unnecessary null checks

During the exp-run in bug 197395, it was found that net/ladvd gives errors with clang 3.6.0:

http://package18.nyi.freebsd.org/data/headamd64PR197395-default/2015-02-11_23h04m51s/logs/errors/ladvd-1.0.4_1.log

This error is because ladvd defines a few functions using __attribute__((nonnull)), then proceeds to check the parameters for being NULL anyway.  This is silly, so remove the checks.
Comment 1 sten 2015-03-19 10:10:15 UTC
That looks like a sensible patch. 

Should I submit a port-update or are you able to handle that part as well?
Comment 2 commit-hook freebsd_committer freebsd_triage 2015-03-22 15:44:58 UTC
A commit references this bug:

Author: sunpoet
Date: Sun Mar 22 15:44:54 UTC 2015
New revision: 381932
URL: https://svnweb.freebsd.org/changeset/ports/381932

Log:
  - Fix build with Clang 3.6.0

  PR:		198437
  Submitted by:	dim
  Approved by:	<sten@blinkenlights.nl> (maintainer)

Changes:
  head/net/ladvd/files/patch-src__util.c
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2015-03-22 15:48:48 UTC
Committed. Thanks!