[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#8919) common.c:2329: suspicious expression ?
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#8919) common.c:2329: suspicious expression ?
- From: hyc@symas.com
- Date: Mon, 24 Sep 2018 12:51:26 +0000
- Auto-submitted: auto-generated (OpenLDAP-ITS)
dcb314@hotmail.com wrote:
> Full_Name: David Binderman
> Version: 2.4.46
> OS: Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (79.65.83.114)
>
>
> common.c:2329:10: warning: logical not is only applied to the left hand side of
> this bitwise operator [-Wlogical-not-parentheses]
Next time please provide a full pathname, not just a filename.
Next time please use "git diff" or "git format-patch"
> Source code is
>
> if ( !tool_ctrl_response[j].mask & tool_type ) {
>
> Maybe better code:
>
> if ( !(tool_ctrl_response[j].mask & tool_type) ) {
>
> I can recommend compiling the openldap product with the clang C/C++ compiler.
Next time read the code you're commenting on. This is an empty if statement, it
has no effect regardless.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/