From 8f8ce85327f1be9e099c569b2c9b94515f9518b7 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 16 Nov 2020 15:15:26 +0000 Subject: [PATCH] libsysprof-capture: Drop duplicate struct typedefs All three of these structs are already defined in `sysprof-capture-types.h`, which is included from these three headers. Drop the duplicate definition to silence the Clang warning: ``` In file included from /opt/gnome/install/include/sysprof-4/sysprof-capture.h:63: /opt/gnome/install/include/sysprof-4/sysprof-capture-cursor.h:67:38: warning: redefinition of typedef 'SysprofCaptureCursor' is a C11 feature [-Wtypedef-redefinition] typedef struct _SysprofCaptureCursor SysprofCaptureCursor; ^ /opt/gnome/install/include/sysprof-4/sysprof-capture-types.h:98:41: note: previous definition is here typedef struct _SysprofCaptureCursor SysprofCaptureCursor; ``` Signed-off-by: Philip Withnall --- src/libsysprof-capture/sysprof-capture-cursor.h | 2 -- src/libsysprof-capture/sysprof-capture-reader.h | 2 -- src/libsysprof-capture/sysprof-capture-writer.h | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/libsysprof-capture/sysprof-capture-cursor.h b/src/libsysprof-capture/sysprof-capture-cursor.h index 5d5693b5..dc4b76ab 100644 --- a/src/libsysprof-capture/sysprof-capture-cursor.h +++ b/src/libsysprof-capture/sysprof-capture-cursor.h @@ -64,8 +64,6 @@ SYSPROF_BEGIN_DECLS -typedef struct _SysprofCaptureCursor SysprofCaptureCursor; - /** * SysprofCaptureCursorCallback: * diff --git a/src/libsysprof-capture/sysprof-capture-reader.h b/src/libsysprof-capture/sysprof-capture-reader.h index c802e0a5..0fdd8b37 100644 --- a/src/libsysprof-capture/sysprof-capture-reader.h +++ b/src/libsysprof-capture/sysprof-capture-reader.h @@ -64,8 +64,6 @@ SYSPROF_BEGIN_DECLS -typedef struct _SysprofCaptureReader SysprofCaptureReader; - SYSPROF_AVAILABLE_IN_ALL SysprofCaptureReader *sysprof_capture_reader_new (const char *filename); SYSPROF_AVAILABLE_IN_ALL diff --git a/src/libsysprof-capture/sysprof-capture-writer.h b/src/libsysprof-capture/sysprof-capture-writer.h index e92007df..8a65726e 100644 --- a/src/libsysprof-capture/sysprof-capture-writer.h +++ b/src/libsysprof-capture/sysprof-capture-writer.h @@ -65,8 +65,6 @@ SYSPROF_BEGIN_DECLS -typedef struct _SysprofCaptureWriter SysprofCaptureWriter; - SYSPROF_AVAILABLE_IN_ALL SysprofCaptureWriter *sysprof_capture_writer_new_from_env (size_t buffer_size); SYSPROF_AVAILABLE_IN_ALL