Author: eadler
Date: Sat Jun  9 04:54:36 2018
New Revision: 334874
URL: https://svnweb.freebsd.org/changeset/base/334874

Log:
  pmc: mark some dead functions as such
  
  Also change a single instance of the comma operator to a semi-colon.
  
  Reviewed by:  mmacy

Modified:
  head/usr.sbin/pmc/cmd_pmc_filter.cc
  head/usr.sbin/pmc/cmd_pmc_list.c
  head/usr.sbin/pmc/cmd_pmc_stat.c
  head/usr.sbin/pmc/cmd_pmc_summary.cc
  head/usr.sbin/pmc/pmc.c

Modified: head/usr.sbin/pmc/cmd_pmc_filter.cc
==============================================================================
--- head/usr.sbin/pmc/cmd_pmc_filter.cc Sat Jun  9 04:40:17 2018        
(r334873)
+++ head/usr.sbin/pmc/cmd_pmc_filter.cc Sat Jun  9 04:54:36 2018        
(r334874)
@@ -89,7 +89,7 @@ static struct option longopts[] = {
        {NULL, 0, NULL, 0}
 };
 
-static void
+static void __dead2
 usage(void)
 {
        errx(EX_USAGE,

Modified: head/usr.sbin/pmc/cmd_pmc_list.c
==============================================================================
--- head/usr.sbin/pmc/cmd_pmc_list.c    Sat Jun  9 04:40:17 2018        
(r334873)
+++ head/usr.sbin/pmc/cmd_pmc_list.c    Sat Jun  9 04:54:36 2018        
(r334874)
@@ -75,7 +75,7 @@ static struct option longopts[] = {
        {NULL, 0, NULL, 0}
 };
 
-static void
+static void __dead2
 usage(void)
 {
        errx(EX_USAGE,

Modified: head/usr.sbin/pmc/cmd_pmc_stat.c
==============================================================================
--- head/usr.sbin/pmc/cmd_pmc_stat.c    Sat Jun  9 04:40:17 2018        
(r334873)
+++ head/usr.sbin/pmc/cmd_pmc_stat.c    Sat Jun  9 04:54:36 2018        
(r334874)
@@ -106,7 +106,7 @@ static const char *pmc_stat_mode_names[] = {
 
 static int pmcstat_sockpair[NSOCKPAIRFD];
 
-static void
+static void __dead2
 usage(void)
 {
        errx(EX_USAGE,
@@ -127,8 +127,10 @@ showtime(FILE *out, struct timespec *before, struct ti
 
        after->tv_sec -= before->tv_sec;
        after->tv_nsec -= before->tv_nsec;
-       if (after->tv_nsec < 0)
-               after->tv_sec--, after->tv_nsec += 1000000000;
+       if (after->tv_nsec < 0) {
+               after->tv_sec--;
+               after->tv_nsec += 1000000000;
+       }
 
        real = (after->tv_sec * 1000000000 + after->tv_nsec) / 1000;
        user = ru->ru_utime.tv_sec * 1000000 + ru->ru_utime.tv_usec;

Modified: head/usr.sbin/pmc/cmd_pmc_summary.cc
==============================================================================
--- head/usr.sbin/pmc/cmd_pmc_summary.cc        Sat Jun  9 04:40:17 2018        
(r334873)
+++ head/usr.sbin/pmc/cmd_pmc_summary.cc        Sat Jun  9 04:54:36 2018        
(r334874)
@@ -83,7 +83,7 @@ typedef unordered_map <uint32_t, std::vector<samplenam
 
 #define        P_KPROC         0x00004 /* Kernel process. */
 
-static void
+static void __dead2
 usage(void)
 {
        errx(EX_USAGE,

Modified: head/usr.sbin/pmc/pmc.c
==============================================================================
--- head/usr.sbin/pmc/pmc.c     Sat Jun  9 04:40:17 2018        (r334873)
+++ head/usr.sbin/pmc/pmc.c     Sat Jun  9 04:54:36 2018        (r334874)
@@ -70,8 +70,8 @@ static struct cmd_handler disp_table[] = {
        {NULL, NULL}
 };
 
-static void
-usage(void)
+static void __dead2
+usage(void) 
 {
        errx(EX_USAGE,
            "\t pmc management utility\n"
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to