• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/eudev/0001-Only-use-pragma-for-ignoring-diagnostics-if-.patch
Peter KorsgaardPeter Korsgaard committed 14af550d5eb23 Jan 2015
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From dc8aa43b7b6d0cead7d8a0c1a151d289a5233a10 Mon Sep 17 00:00:00 2001
2
From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
3
Date: Wed, 2 Apr 2014 12:36:52 +0200
4
Subject: [PATCH] libudev: Only use #pragma for ignoring diagnostics if GCC
5
 version supports it.
6
​
7
[Peter: update for 2.1.1, fix shared_assert issue]
8
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
9
---
10
 src/shared/macro.h |    8 +++++
11
 1 file changed, 8 insertions(+)
12
​
13
diff --git a/src/shared/macro.h b/src/shared/macro.h
14
--- a/src/shared/macro.h
15
+++ b/src/shared/macro.h
16
@@ -38,6 +38,7 @@
17
 #define _cleanup_(x) __attribute__((cleanup(x)))
18
 
19
 /* Temporarily disable some warnings */
20
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
21
 #define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT                     \
22
         _Pragma("GCC diagnostic push");                                 \
23
         _Pragma("GCC diagnostic ignored \"-Wdeclaration-after-statement\"")
24
@@ -48,6 +49,13 @@
25
 
26
 #define REENABLE_WARNING                                                \
27
         _Pragma("GCC diagnostic pop")
28
+#else
29
+#define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT
30
+#define DISABLE_WARNING_FORMAT_NONLITERAL
31
+#define REENABLE_WARNING
32
+/* glibc unconditionally defines this, but it needs GCC 4.6+ */
33
+#undef static_assert
34
+#endif
35
 
36
 #define XCONCATENATE(x, y) x ## y
37
 #define CONCATENATE(x, y) XCONCATENATE(x, y)
38
-- 
39
1.7.9.5
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.