[Git][NTPsec/ntpsec][master] Fix function declarations that were missing "void" as an argument

Gary E. Miller (@garyedmundsmiller) gitlab at mg.gitlab.com
Tue Jun 20 18:29:32 UTC 2023



Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
c2dff50b by Matt Selsky at 2023-06-20T02:06:40-04:00
Fix function declarations that were missing "void" as an argument

This resolves the warning:
warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]

- - - - -


3 changed files:

- ntpd/ntp_io.c
- ntpd/ntp_scanner.c
- ntpd/ntpd.c


Changes:

=====================================
ntpd/ntp_io.c
=====================================
@@ -3148,7 +3148,7 @@ process_routing_msgs(struct asyncio_reader *reader)
  * set up routing notifications
  */
 static void
-init_async_notifications()
+init_async_notifications(void)
 {
 	struct asyncio_reader *reader;
 #ifdef HAVE_LINUX_RTNETLINK_H


=====================================
ntpd/ntp_scanner.c
=====================================
@@ -328,7 +328,7 @@ lex_init_stack(
  * anything until the next 'lex_init_stack()' succeeded.
  */
 void
-lex_drop_stack()
+lex_drop_stack(void)
 {
 	lex_stack = _drop_stack_do(lex_stack);
 }
@@ -342,7 +342,7 @@ lex_drop_stack()
  * in the force-eof mode before this call.
  */
 bool
-lex_flush_stack() {
+lex_flush_stack(void) {
 	bool retv = false;
 
 	if (NULL != lex_stack) {
@@ -521,7 +521,7 @@ lex_from_file(void)
 }
 
 struct FILE_INFO *
-lex_current()
+lex_current(void)
 {
 	/* this became so simple, it could be a macro. But then,
 	 * lex_stack needed to be global...


=====================================
ntpd/ntpd.c
=====================================
@@ -892,7 +892,7 @@ main(
  * If using a log file, there should be enough info in syslog
  * to debug things with minimal extra clutter.
  */
-void announce_starting() {
+void announce_starting(void) {
 	char buf[1024];	/* Secret knowledge of msyslog buf length */
 	char *cp = buf;
 
@@ -1124,7 +1124,7 @@ wait_child_sync_if(
  * With 3 working servers, 2 can outvote a falseticker
  * With 4 servers, you still have 3 if one is down.
  */
-static void check_minsane()
+static void check_minsane(void)
 {
 	struct peer *peer;
 	int servers = 0;



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/c2dff50b7ea64968449e49e416334410e35fee84

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/c2dff50b7ea64968449e49e416334410e35fee84
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/20230620/f6f60b34/attachment-0001.htm>


More information about the vc mailing list