<pre style='margin:0'>
Rainer Müller (raimue) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/3c5e6523d2855497ad5530edf88a325f9cad6a7e">https://github.com/macports/macports-base/commit/3c5e6523d2855497ad5530edf88a325f9cad6a7e</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 3c5e6523d2855497ad5530edf88a325f9cad6a7e
</span>Author: Christopher Chavez <chrischavez@gmx.us>
AuthorDate: Sat Oct 28 01:07:53 2023 -0500
<span style='display:block; white-space:pre;color:#404040;'> Specify void parameter in function declarators
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes: https://trac.macports.org/ticket/68320
</span>---
src/darwintracelib1.0/darwintrace.c | 16 ++++++++--------
src/darwintracelib1.0/darwintrace.h | 12 ++++++------
src/darwintracelib1.0/proc.c | 2 +-
src/machista1.0/tests/empty.c | 2 +-
src/machista1.0/tests/libmachista-test.c | 2 +-
src/programs/daemondo/main.c | 4 ++--
6 files changed, 19 insertions(+), 19 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/darwintracelib1.0/darwintrace.c b/src/darwintracelib1.0/darwintrace.c
</span><span style='display:block; white-space:pre;color:#808080;'>index a4f81bf79..af9d19a75 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/darwintracelib1.0/darwintrace.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/darwintracelib1.0/darwintrace.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -130,12 +130,12 @@ volatile bool __darwintrace_initialized = false;
</span> * interposed functions might end up being called first) we'll run them manually
* before we interpose anything.
*/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-static void (*constructors[])() = {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+static void (*constructors[])(void) = {
</span> __darwintrace_setup_tls,
__darwintrace_store_env,
};
<span style='display:block; white-space:pre;background:#ffe0e0;'>-void __darwintrace_run_constructors() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+void __darwintrace_run_constructors(void) {
</span> for (size_t i = 0; i < sizeof(constructors) / sizeof(*constructors); ++i) {
constructors[i]();
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -153,7 +153,7 @@ static void __darwintrace_sock_destructor(FILE *dtsock) {
</span> * Setup method called as constructor to set up thread-local storage for the
* thread id and the darwintrace socket.
*/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-void __darwintrace_setup_tls() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+void __darwintrace_setup_tls(void) {
</span> if (0 != (errno = pthread_key_create(&tid_key, NULL))) {
perror("darwintrace: pthread_key_create");
abort();
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -176,7 +176,7 @@ static inline pthread_t __darwintrace_tid() {
</span> /**
* Convenience setter function for the thread-local darwintrace socket
*/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-static inline void __darwintrace_tid_set() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+static inline void __darwintrace_tid_set(void) {
</span> if (0 != (errno = pthread_setspecific(tid_key, (const void *) pthread_self()))) {
perror("darwintrace: pthread_setspecific");
abort();
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -290,7 +290,7 @@ static inline char *__darwintrace_filemap_iter(char *command, filemap_iterator_t
</span> * Request sandbox boundaries from tracelib (the MacPorts base-controlled side
* of the trace setup) and store it.
*/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-static void __darwintrace_get_filemap() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+static void __darwintrace_get_filemap(void) {
</span> char *newfilemap;
#if DARWINTRACE_DEBUG && 0
filemap_iterator_t it;
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -346,7 +346,7 @@ static void __darwintrace_get_filemap() {
</span> * library and this library prevents closing the socket to MacPorts, we use \c
* __darwintrace_close_sock to allow closing specific FDs.
*/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-void __darwintrace_close() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+void __darwintrace_close(void) {
</span> FILE *dtsock = __darwintrace_sock();
if (dtsock) {
__darwintrace_close_sock = fileno(dtsock);
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -362,7 +362,7 @@ void __darwintrace_close() {
</span> * called after \c fork(2), i.e. when the current PID doesn't match the one
* stored when the function was called last.
*/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-void __darwintrace_setup() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+void __darwintrace_setup(void) {
</span> /*
* Check whether this is a child process and we've inherited the socket. We
* want to avoid race conditions with our parent process when communicating
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -739,7 +739,7 @@ typedef struct {
</span> *
* @return Pointer to the new path_t on success, NULL on error.
*/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-static path_t *path_new() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+static path_t *path_new(void) {
</span> path_t *path = NULL;
path = malloc(sizeof(path_t));
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/darwintracelib1.0/darwintrace.h b/src/darwintracelib1.0/darwintrace.h
</span><span style='display:block; white-space:pre;color:#808080;'>index 3999d5fd1..25ea03fa9 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/darwintracelib1.0/darwintrace.h
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/darwintracelib1.0/darwintrace.h
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -95,7 +95,7 @@ extern FILE *__darwintrace_stderr;
</span> * whether this process was fork(2)'d or clone(2)'d since the last call. Call
* this before calling any other functions from this library.
*/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-void __darwintrace_setup();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+void __darwintrace_setup(void);
</span>
/**
* Close the darwintrace socket and set it to \c NULL. Since this uses \c
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -103,7 +103,7 @@ void __darwintrace_setup();
</span> * library and this library prevents closing the socket to MacPorts, we use \c
* __darwintrace_close_sock to allow closing specific FDs.
*/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-void __darwintrace_close();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+void __darwintrace_close(void);
</span>
/**
* Check a path against the current sandbox
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -173,7 +173,7 @@ extern pthread_key_t sock_key;
</span> * consider this part of public API. It is only needed to prevent closing and
* duplicating over darwintrace's socket FDs.
*/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-static inline FILE *__darwintrace_sock() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+static inline FILE *__darwintrace_sock(void) {
</span> return (FILE *) pthread_getspecific(sock_key);
}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -192,18 +192,18 @@ static inline void __darwintrace_sock_set(FILE *stream) {
</span> /**
* Initialize TLS variables.
*/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-void __darwintrace_setup_tls();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+void __darwintrace_setup_tls(void);
</span>
/**
* Grab environment variables at startup.
*/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-void __darwintrace_store_env();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+void __darwintrace_store_env(void);
</span>
/**
* Runs our "constructors". By this point all of the system libraries we link
* against should be fully initialized, so we can call their functions safely.
* Once our initialization is complete we may begin interposing.
*/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-void __darwintrace_run_constructors() __attribute__((constructor));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+void __darwintrace_run_constructors(void) __attribute__((constructor));
</span>
#endif /* defined(DARWINTRACE_USE_PRIVATE_API) */
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/darwintracelib1.0/proc.c b/src/darwintracelib1.0/proc.c
</span><span style='display:block; white-space:pre;color:#808080;'>index e3b31c93b..8ab1cf131 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/darwintracelib1.0/proc.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/darwintracelib1.0/proc.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -74,7 +74,7 @@ static char *__env_full_darwintrace_log;
</span> * Copy the environment variables, if they're defined. This is run as
* a constructor at startup.
*/
<span style='display:block; white-space:pre;background:#ffe0e0;'>-void __darwintrace_store_env() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+void __darwintrace_store_env(void) {
</span> #define COPYENV(name, variable, valuevar) do {\
char *val;\
if (NULL != (val = getenv(#name))) {\
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/machista1.0/tests/empty.c b/src/machista1.0/tests/empty.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 85e6cd8c3..a53eae6b5 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/machista1.0/tests/empty.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/machista1.0/tests/empty.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1 +1 @@
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-void foo() {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+void foo(void) {}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/machista1.0/tests/libmachista-test.c b/src/machista1.0/tests/libmachista-test.c
</span><span style='display:block; white-space:pre;color:#808080;'>index fe00d0f2a..6dab13c34 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/machista1.0/tests/libmachista-test.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/machista1.0/tests/libmachista-test.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -344,7 +344,7 @@ error_out:
</span> }
#endif
<span style='display:block; white-space:pre;background:#ffe0e0;'>-int main() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+int main(void) {
</span> #ifdef __MACH__
bool result = true;
result &= test_destroy_null();
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/programs/daemondo/main.c b/src/programs/daemondo/main.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 9a5f7affd..4f81007ac 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/programs/daemondo/main.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/programs/daemondo/main.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -408,14 +408,14 @@ MonitorChild(pid_t childPid)
</span>
void
<span style='display:block; white-space:pre;background:#ffe0e0;'>-UnmonitorChild()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+UnmonitorChild(void)
</span> {
runningPid = 0;
}
int
<span style='display:block; white-space:pre;background:#ffe0e0;'>-MonitoringChild()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+MonitoringChild(void)
</span> {
return runningPid != 0;
}
</pre><pre style='margin:0'>
</pre>