[Dnsmasq-discuss] [PATCH] Value stored to 'outmsgtype' is never read

Petr Menšík pemensik at redhat.com
Tue Mar 14 11:51:18 UTC 2023


Hi!

Our coverity scan detected new CLANG warning after I have cherry-picked 
commit 03345ecefeb0d82e3c3a4c28f27c3554f0611b39 [1] into our rhel8 
release. It reported it for 2.79 version, but even the last commit in 
master branch still has the same issue present. In attached patch I have 
suggested fix.

I am not sure how to trigger this code from the client, so this is not 
tested with real dhcp client. I track it under Fedora bug [2]. Coverity 
reported it as:

1. Defect type: CLANG_WARNING
1. dnsmasq-2.79/src/rfc3315.c:344:7: warning[deadcode.DeadStores]: Value stored to 'outmsgtype' is never read
#   342|
#   343|       {
#   344|->       outmsgtype = DHCP6REPLY;
#   345|         o1 = new_opt6(OPTION6_STATUS_CODE);
#   346|         put_opt6_short(DHCP6USEMULTI);

1. 
http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=03345ecefeb0d82e3c3a4c28f27c3554f0611b39
2. https://bugzilla.redhat.com/show_bug.cgi?id=2178069

-- 
Petr Menšík
Software Engineer, RHEL
Red Hat,http://www.redhat.com/
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20230314/f896b137/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-Value-stored-to-outmsgtype-is-never-read.patch
Type: text/x-patch
Size: 1400 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20230314/f896b137/attachment.bin>


More information about the Dnsmasq-discuss mailing list