aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/at91bootstrap/at91bootstrap-3.1.2/0038-Avoid-warnings-on-gcc-4.6.patch
blob: 9aeb91297d977eee4cac6e5be651c7d7db33243e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From 64d6da3f691eb81ad546e6567e3e8f6ac3fe6ea6 Mon Sep 17 00:00:00 2001
From: Ulf Samuelsson <ulf_samuelsson@telia.com>
Date: Fri, 28 Oct 2011 12:47:06 +0200
Subject: [PATCH 38/39] Avoid warnings on gcc-4.6

---
 driver/sdmmc_mci.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/driver/sdmmc_mci.c b/driver/sdmmc_mci.c
index 9112579..a7ee29f 100644
--- a/driver/sdmmc_mci.c
+++ b/driver/sdmmc_mci.c
@@ -2188,6 +2188,9 @@ unsigned char SD_WriteBlock(SdCard * pSd,
 /// \param pSd  Pointer to a SD card driver instance.
 /// \param pSdDriver  Pointer to SD driver already initialized
 //------------------------------------------------------------------------------
+// busWidth gives warnings
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
 static unsigned short SdMmcInit(SdCard * pSd, SdDriver * pSdDriver)
 {
     unsigned char isCCSet;
@@ -2339,10 +2342,6 @@ static unsigned short SdMmcInit(SdCard * pSd, SdDriver * pSdDriver)
 
         dbg_log(1, "Is card MMC one?\n\r");
 
-// busWidth gives warnings
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
-
         if (SD_CSD_STRUCTURE(pSd) >= 2) {
 
             MmcCmd6Arg cmd6Arg;
@@ -2403,7 +2402,6 @@ static unsigned short SdMmcInit(SdCard * pSd, SdDriver * pSdDriver)
             }
 #endif                          // end of OP_BOOTSTRAP_MCI_on
         }
-#pragma GCC diagnostic pop
     } else if (pSd->cardType >= CARD_SD) {
 
         // Switch to 4-bits bus width
@@ -2479,6 +2477,7 @@ static unsigned short SdMmcInit(SdCard * pSd, SdDriver * pSdDriver)
 #endif
     return 0;
 }
+#pragma GCC diagnostic pop
 
 //------------------------------------------------------------------------------
 /// Run the SDcard initialization sequence. This function runs the
-- 
1.7.5.4