diff mbox

libdrm: Make some drm headers compatible with gcc -std=c89 -pedantic

Message ID 1377531556-15580-1-git-send-email-djkurtz@chromium.org (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Kurtz Aug. 26, 2013, 3:39 p.m. UTC
The following minor changes were needed to these headers:
 * Convert // comments to /* */
 * No , after final member of enum

With these changes, these header files can be included by a program that
is built with gcc options:
  -std=c89 -Werror -pedantic

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
---
 include/drm/drm.h | 4 ++--
 xf86drmMode.h     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

Comments

Eric Anholt Sept. 22, 2013, 8:31 p.m. UTC | #1
Daniel Kurtz <djkurtz@chromium.org> writes:

> The following minor changes were needed to these headers:
>  * Convert // comments to /* */
>  * No , after final member of enum
>
> With these changes, these header files can be included by a program that
> is built with gcc options:
>   -std=c89 -Werror -pedantic

Just noticed this still in my todo pile and pushed it.  Sorry for the
delay!
diff mbox

Patch

diff --git a/include/drm/drm.h b/include/drm/drm.h
index 71a2ac1..f400642 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -181,7 +181,7 @@  enum drm_map_type {
 	_DRM_AGP = 3,		  /**< AGP/GART */
 	_DRM_SCATTER_GATHER = 4,  /**< Scatter/gather memory for PCI DMA */
 	_DRM_CONSISTENT = 5,	  /**< Consistent memory for PCI DMA */
-	_DRM_GEM = 6,		  /**< GEM object */
+	_DRM_GEM = 6		  /**< GEM object */
 };
 
 /**
@@ -435,7 +435,7 @@  struct drm_draw {
  * DRM_IOCTL_UPDATE_DRAW ioctl argument type.
  */
 typedef enum {
-	DRM_DRAWABLE_CLIPRECTS,
+	DRM_DRAWABLE_CLIPRECTS
 } drm_drawable_info_type_t;
 
 struct drm_update_draw {
diff --git a/xf86drmMode.h b/xf86drmMode.h
index f8a817c..5bc60ee 100644
--- a/xf86drmMode.h
+++ b/xf86drmMode.h
@@ -218,11 +218,11 @@  typedef struct _drmModeProperty {
 	uint32_t flags;
 	char name[DRM_PROP_NAME_LEN];
 	int count_values;
-	uint64_t *values; // store the blob lengths
+	uint64_t *values; /* store the blob lengths */
 	int count_enums;
 	struct drm_mode_property_enum *enums;
 	int count_blobs;
-	uint32_t *blob_ids; // store the blob IDs
+	uint32_t *blob_ids; /* store the blob IDs */
 } drmModePropertyRes, *drmModePropertyPtr;
 
 typedef struct _drmModeCrtc {