Skip to content

Commit

Permalink
Some of the X headers on OSX are apparently causing -Wdocumentation w…
Browse files Browse the repository at this point in the history
…arnings...

(cherry picked from commit fddaf4d)
  • Loading branch information
starseeker committed Sep 25, 2024
1 parent 354b983 commit 2e22c67
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libdm/X/color.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,17 @@
#include <stdio.h>
#include <string.h>

#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdocumentation"
#endif
#ifdef HAVE_X11_XLIB_H
# include <X11/Xlib.h>
#endif
#if defined(__clang__)
# pragma clang diagnostic pop
#endif

#include "vmath.h"

#include "bu/malloc.h"
Expand Down
9 changes: 9 additions & 0 deletions src/libdm/X/dm-X.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
#include <string.h>
#include <math.h>

#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdocumentation"
#endif

#define class REDEFINE_CLASS_STRING_TO_AVOID_CXX_CONFLICT
#include <X11/Xlib.h>
#include <X11/Xutil.h>
Expand All @@ -44,6 +49,10 @@
# include <X11/extensions/XInput.h>
#endif /* HAVE_X11_XINPUT_H */

#if defined(__clang__)
# pragma clang diagnostic pop
#endif

#if defined(linux)
# undef X_NOT_STDC_ENV
# undef X_NOT_POSIX
Expand Down
7 changes: 7 additions & 0 deletions src/libdm/X/dm-X.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,15 @@

#include "common.h"

#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdocumentation"
#endif
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#if defined(__clang__)
# pragma clang diagnostic pop
#endif

#include "tk.h"
#define HAVE_X11_TYPES 1
Expand Down
8 changes: 8 additions & 0 deletions src/libdm/X/fb_X.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@

#ifdef FB_USE_INTERNAL_API
#include "common.h"

#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdocumentation"
#endif
#include <X11/X.h>
#if defined(__clang__)
# pragma clang diagnostic pop
#endif

struct X24_fb_info {
Display *dpy;
Expand Down
7 changes: 7 additions & 0 deletions src/libdm/X/if_X24.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
# endif
#endif

#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdocumentation"
#endif
#include <X11/X.h>
#ifdef HAVE_XOSDEFS_H
# include <X11/Xfuncproto.h>
Expand All @@ -65,6 +69,9 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#if defined(__clang__)
# pragma clang diagnostic pop
#endif

#include <ctype.h>

Expand Down

0 comments on commit 2e22c67

Please sign in to comment.