Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Nov 2011 00:21:16 GMT
From:      Alexander Best <arundel@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/162321: unnecessary self-assignment in libc/resolv/res_send.c
Message-ID:  <201111060021.pA60LGCL078133@red.freebsd.org>
Resent-Message-ID: <201111060030.pA60U8rF078303@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help


>Number:         162321
>Category:       kern
>Synopsis:       unnecessary self-assignment in libc/resolv/res_send.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 06 00:30:08 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Best
>Release:        10.0-CURRENT
>Organization:
>Environment:
FreeBSD otaku 10.0-CURRENT FreeBSD 10.0-CURRENT #6: Fri Nov  4 14:33:13 CET 2011     arundel@otaku:/usr/obj/usr/git-freebsd-head/sys/ARUNDEL  amd64
>Description:
i believe the following assignment is unnecessary and can be removed:

/usr/local/bin/clang -fpic -DPIC -O2 -pipe -march=core2 -DSTRIP_FBSDID -I/usr/git-freebsd-head/lib/libc/include -I/usr/git-freebsd-head/lib/libc/../../include -I/usr/git-freebsd-head/lib/libc/amd64 -DNLS  -D__DBINTERFACE_PRIVATE -I/usr/git-freebsd-head/lib/libc/../../contrib/gdtoa -I/usr/obj/usr/git-freebsd-head/lib/libc -I/usr/git-freebsd-head/lib/libc/resolv -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/usr/git-freebsd-head/lib/libc/../../contrib/tzcode/stdtime -I/usr/git-freebsd-head/lib/libc/stdtime -I/usr/git-freebsd-head/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/git-freebsd-head/lib/libc/rpc -DSYMBOL_VERSIONING -std=gnu99 -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -c /usr/git-freebsd-head/lib/libc/resolv/res_send.c -o res_send.So
/usr/git-freebsd-head/lib/libc/resolv/res_send.c:1105:7: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
        alen = alen;
        ~~~~ ^ ~~~~
1 warning generated.

cheers.
alex
>How-To-Repeat:
run buildworld with clang (or clang tot in my case) as compiler.
>Fix:
get rid of the assignment. ;)

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111060021.pA60LGCL078133>