warnings from recent git pull

Hal Murray hmurray at megapathdsl.net
Thu May 25 22:46:22 UTC 2017


>From Fedora and many/most other systems:

test-all/test.log:../../ntpd/ntp_loopfilter.c:170:12: warning: ‘state’ 
defined but not used [-Wunused-variable]
test-minimal/test.log:../../ntpd/ntp_loopfilter.c:160:13: warning: 
‘ext_enable’ defined but not used [-Wunused-variable]

>From netbsd:
../../tests/libparse/binio.c:130:23: warning: declaration of 'exp' shadows a 
global declaration
../../tests/libparse/binio.c:140:23: warning: declaration of 'exp' shadows a 
global declaration
../../tests/libparse/binio.c:150:23: warning: declaration of 'exp' shadows a 
global declaration
../../tests/libparse/binio.c:160:23: warning: declaration of 'exp' shadows a 
global declaration
../../tests/libparse/binio.c:170:23: warning: declaration of 'exp' shadows a 
global declaration

Why don't we get this on other platforms?

--------

This chunk of code from start_kern_loop in loopfilter looks suspicious.  I 
think the ifdef should test STA_CLK rather than STA_NANO but it might be more 
complicated.  It will probably require looking in the kernel sources to 
understand this area.

        if (pll_control) {
                if (!atexit_done) {
                        atexit_done = true;
                        atexit(&stop_kern_loop);
                }
#ifdef STA_NANO
                if (pll_status & STA_CLK)
                        ext_enable = true;
#endif /* STA_NANO */
                report_event(EVNT_KERN, NULL,
                    "kernel time sync enabled");
        }

We should also review the atexit stuff.  The system can crash or get kill-ed 
-9 without running the exit code.  What happens if it doesn't get run?

Some of the cleanup stuff is just free-ing malloc-ed memory.  That helps 
tracking down dangling memory but isn't critical.


-- 
These are my opinions.  I hate spam.





More information about the devel mailing list