From 5315cb9f3e61862ecac7c17b5d29c3886618b9a2 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Wed, 11 Mar 2020 10:25:09 +0100 Subject: Add "extern" to stderr to avoid CFFI warning UserWarning: Global variable 'stderr' in cdef(): for consistency with C it should have a storage class specifier (usually 'extern') --- sounddevice_build.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sounddevice_build.py b/sounddevice_build.py index c16e092..290dcfd 100644 --- a/sounddevice_build.py +++ b/sounddevice_build.py @@ -313,8 +313,8 @@ ffibuilder.cdef(""" /* from stdio.h */ FILE* fopen(const char* path, const char* mode); int fclose(FILE* fp); - FILE* stderr; /* GNU C library */ - FILE* __stderrp; /* macOS */ + extern FILE* stderr; /* GNU C library */ + extern FILE* __stderrp; /* macOS */ """) if __name__ == '__main__': -- cgit v1.2.3