Red Hat Bugzilla – Bug 902739
dtrace generates poor quality C code that provokes static analyzers
Last modified: 2013-11-21 06:45:42 EST
Description of problem: We get defect reports like this from Coverity: Error: MISSING_RETURN: /tmp/tmpp5tUKb.c:1: missing_return: Arriving at the end of a function without returning a value. Version-Release number of selected component (if applicable): systemtap-1.8-7.el6 How reproducible: easily Steps to Reproduce: 1. printf "providers xxx { };\n" > xxx 2. dtrace -G -k -s xxx 3. gcc -c -Wall /tmp/tmpXXXXXX.c Actual results: $ printf "providers xxx { };" > xxx $ dtrace -G -k -s xxx header: /tmp/tmp_hnRff.h source: /tmp/tmpXTWPUV.c $ gcc -c -Wall /tmp/tmpXTWPUV.c /tmp/tmpXTWPUV.c:1: warning: return type defaults to ‘int’ /tmp/tmpXTWPUV.c: In function ‘__dtrace’: /tmp/tmpXTWPUV.c:1: warning: control reaches end of non-void function /tmp/tmpXTWPUV.c: At top level: /tmp/tmpXTWPUV.c:1: warning: ‘__dtrace’ defined but not used
Upstream commit 69607fc corrects this.
Thanks for the quick response!
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1630.html