Skip to content

resolve all compiler warnings #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ EXTRA_libdispatch_la_DEPENDENCIES=
AM_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/private

DISPATCH_CFLAGS=-Wall $(VISIBILITY_FLAGS) $(OMIT_LEAF_FP_FLAGS) \
-Wno-extern-c-compat \
$(MARCH_FLAGS) $(KQUEUE_CFLAGS) $(BSD_OVERLAY_CFLAGS)
AM_CFLAGS= $(PTHREAD_WORKQUEUE_CFLAGS) $(DISPATCH_CFLAGS) $(CBLOCKS_FLAGS)
AM_OBJCFLAGS=$(DISPATCH_CFLAGS) $(CBLOCKS_FLAGS)
Expand Down
2 changes: 1 addition & 1 deletion src/queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ _dispatch_root_queues_init_qos(int supported)
static inline bool
_dispatch_root_queues_init_workq(int *wq_supported)
{
int r;
int r DISPATCH_UNUSED;
bool result = false;
*wq_supported = 0;
#if HAVE_PTHREAD_WORKQUEUES
Expand Down
6 changes: 4 additions & 2 deletions src/shims/linux_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ void _dispatch_runloop_queue_dispose() { LINUX_PORT_ERROR(); }
char* mach_error_string(mach_msg_return_t x) {
LINUX_PORT_ERROR();
}
void mach_vm_deallocate() { LINUX_PORT_ERROR(); }
void mach_vm_deallocate(mach_port_t x, mach_vm_address_t y, mach_vm_size_t z) {
LINUX_PORT_ERROR();
}

mach_port_t pthread_mach_thread_np(void) {
mach_port_t pthread_mach_thread_np(uintptr_t unused) {
return (pid_t)syscall(SYS_gettid);
}
mach_port_t mach_task_self(void) {
Expand Down
4 changes: 4 additions & 0 deletions src/shims/linux_stubs.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ typedef void (*dispatch_mach_msg_destructor_t)(void*);

mach_port_t mach_task_self();

mach_port_t pthread_mach_thread_np(uintptr_t unused);
char* mach_error_string(mach_msg_return_t x);
void mach_vm_deallocate(mach_port_t, mach_vm_address_t, mach_vm_size_t);

// Print a warning when an unported code path executes.
#define LINUX_PORT_ERROR() do { printf("LINUX_PORT_ERROR_CALLED %s:%d: %s\n",__FILE__,__LINE__,__FUNCTION__); } while (0)

Expand Down