[Git][NTPsec/ntpsec][master] Remove trailing semicolons from function declarations and macros

Matt Selsky gitlab at mg.gitlab.com
Fri Feb 8 17:15:09 UTC 2019


Matt Selsky pushed to branch master at NTPsec / ntpsec


Commits:
96edbcc8 by Matt Selsky at 2019-02-08T17:11:55Z
Remove trailing semicolons from function declarations and macros

clang was reporting:

extra ';' outside of a function

when building with -Wpedantic

- - - - -


5 changed files:

- include/ntp_stdlib.h
- libntp/ntp_dns.c
- ntpd/ntp_config.c
- tests/libparse/gpstolfp.c
- tests/ntpd/leapsec.c


Changes:

=====================================
include/ntp_stdlib.h
=====================================
@@ -22,7 +22,7 @@
 #endif
 
 #ifndef __sysloglike
-#define __sysloglike(fmt, args) ;
+#define __sysloglike(fmt, args)
 #endif /* __sysloglike */
 
 #ifdef __GNUC__


=====================================
libntp/ntp_dns.c
=====================================
@@ -78,7 +78,7 @@ bool dns_probe(struct peer* pp)
         pthread_sigmask(SIG_SETMASK, &saved_sig_mask, NULL);
 
 	return true;
-};
+}
 
 void dns_check(void)
 {
@@ -133,7 +133,7 @@ void dns_check(void)
 	if (NULL != answer)
 		freeaddrinfo(answer);
 	active = NULL;
-};
+}
 
 /* Beware: no calls to msyslog from here.
  * It's not thread safe.
@@ -166,5 +166,5 @@ static void* dns_lookup(void* arg)
 	 * More portable than an attribute or directive
 	 */
 	return (void *)NULL;
-};
+}
 


=====================================
ntpd/ntp_config.c
=====================================
@@ -3184,7 +3184,7 @@ void readconfig(const char *config_file)
 void set_keys_file(char* keys)
 {
 	cfgt.auth.keys = estrdup(keys);
-};
+}
 
 void set_trustedkey(keyid_t tkey)
 {
@@ -3192,7 +3192,7 @@ void set_trustedkey(keyid_t tkey)
 	attr_val *val2 = NULL;
 	APPEND_G_FIFO(val2, val);
 	CONCAT_G_FIFOS(cfgt.auth.trusted_key_list, val2);
-};
+}
 
 
 


=====================================
tests/libparse/gpstolfp.c
=====================================
@@ -9,8 +9,8 @@
 
 TEST_GROUP(gpstolfp);
 
-TEST_SETUP(gpstolfp){};
-TEST_TEAR_DOWN(gpstolfp){};
+TEST_SETUP(gpstolfp){}
+TEST_TEAR_DOWN(gpstolfp){}
 
 TEST(gpstolfp, check) {
 	uint64_t build_t, gps_t;


=====================================
tests/ntpd/leapsec.c
=====================================
@@ -440,7 +440,7 @@ my_fprintf(FILE *stream, const char *fmt, ...) {
 	vfprintf(stream, fmt, ap);
 	va_end(ap);
 
-};
+}
 
 
 // ----------------------------------------------------------------------



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/96edbcc8aa0329b5e2887664dee8199745fa56e5

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/96edbcc8aa0329b5e2887664dee8199745fa56e5
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20190208/9b34dad3/attachment-0001.html>


More information about the vc mailing list