libfprint/SOURCES/0075-nbis-log-Don-t-use-old...

56 lines
2.0 KiB
Diff

From e0344288b01f66bf4b600468692a1110c8abbe24 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Wed, 4 Dec 2019 13:13:14 +0100
Subject: [PATCH 075/181] nbis/log: Don't use old-style function declarations
---
libfprint/nbis/mindtct/log.c | 4 ++--
libfprint/nbis/update-from-nbis.sh | 6 +++++-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/libfprint/nbis/mindtct/log.c b/libfprint/nbis/mindtct/log.c
index b1dcaad..dcd3db7 100644
--- a/libfprint/nbis/mindtct/log.c
+++ b/libfprint/nbis/mindtct/log.c
@@ -66,7 +66,7 @@ of the software.
/***************************************************************************/
/***************************************************************************/
-int open_logfile()
+int open_logfile(void)
{
#ifdef LOG_REPORT
fprintf(stderr, "ERROR : open_logfile : fopen : %s\n", LOG_FILE);
@@ -91,7 +91,7 @@ void print2log(char *fmt, ...)
/***************************************************************************/
/***************************************************************************/
-int close_logfile()
+int close_logfile(void)
{
#ifdef LOG_REPORT
fprintf(stderr, "ERROR : close_logfile : fclose : %s\n", LOG_FILE);
diff --git a/libfprint/nbis/update-from-nbis.sh b/libfprint/nbis/update-from-nbis.sh
index c8cde80..742c8cb 100755
--- a/libfprint/nbis/update-from-nbis.sh
+++ b/libfprint/nbis/update-from-nbis.sh
@@ -179,9 +179,13 @@ sed -i 's/[ \t]*$//' `find -name "*.[ch]"`
# Remove usebsd.h
sed -i '/usebsd.h/d' `find -name "*.[ch]"`
+# Replace functions with empty parameters using (void)
+sed -i 's/^\([[:space:]]*[[:alnum:]_]\+[\*[:space:]]\+'\
+'[[:alnum:]_]\+[[:space:]]*\)([[:space:]]*)/\1(void)/g' `find -name "*.[ch]"`
+
# Use GLib memory management
spatch --sp-file glib-memory.cocci --dir . --in-place
# The above leaves an unused variable around, triggering a warning
# remove it.
-patch -p0 < glib-mem-warning.patch
\ No newline at end of file
+patch -p0 < glib-mem-warning.patch
--
2.24.1