miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

minor clang "dead store" warning

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Bugs
View previous topic :: View next topic  
Author Message
Charles



Joined: 06 Nov 2007
Posts: 20

PostPosted: Thu Jul 17, 2008 7:57 pm    Post subject: minor clang "dead store" warning Reply with quote

A Transmission user recently ran the Clang static code analyzer on its code. It generated a few warnings on my own code, and also a very minor miniupnpc warning. In fact it's so minor I hesitate to report it, but I figured I'd you'd enjoy knowing that Clang liked the rest of miniupnpc. Smile

Basically the variable `soapbodylen' is assigned on miniupnp.c:161 but never read because soapbodylen is only used in the `else' branch that follows that section. Here is a patch that fixes the warning by moving soapbodylen's scope down into that `else' branch.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1525

PostPosted: Fri Jul 18, 2008 3:42 pm    Post subject: Reply with quote

wow ! Smile
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Bugs All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.