summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2018-11-29 05:41:33 +1100
committerChris Johns <chrisj@rtems.org>2018-11-29 05:45:21 +1100
commit3d2db56f7d013051406a81af107a61d00ac34ad1 (patch)
tree3218c59ea64d12f898873013dff8d2cf7810f9c0
parentwaf: Fix version paths on Windows. (diff)
downloadrtems-tools-3d2db56f7d013051406a81af107a61d00ac34ad1.tar.bz2
Fix warnings on Windows.
-rw-r--r--linkers/rtems-addr2line.cpp2
-rw-r--r--linkers/rtems-exeinfo.cpp2
-rw-r--r--linkers/rtems-ld.cpp2
-rw-r--r--linkers/rtems-ra.cpp2
-rw-r--r--linkers/rtems-rapper.cpp2
-rw-r--r--linkers/rtems-syms.cpp2
-rw-r--r--linkers/rtems-tld.cpp2
-rw-r--r--misc/bin2c/rtems-bin2c.c4
-rw-r--r--rtemstoolkit/ConvertUTF.c30
-rw-r--r--rtemstoolkit/rld-dwarf.cpp4
10 files changed, 24 insertions, 28 deletions
diff --git a/linkers/rtems-addr2line.cpp b/linkers/rtems-addr2line.cpp
index 8aab7de..309fa68 100644
--- a/linkers/rtems-addr2line.cpp
+++ b/linkers/rtems-addr2line.cpp
@@ -287,7 +287,7 @@ main (int argc, char* argv[])
<< std::endl;
ec = 10;
}
- catch (std::exception e)
+ catch (std::exception& e)
{
rld::output_std_exception (e, std::cerr);
ec = 11;
diff --git a/linkers/rtems-exeinfo.cpp b/linkers/rtems-exeinfo.cpp
index e0d8832..018c732 100644
--- a/linkers/rtems-exeinfo.cpp
+++ b/linkers/rtems-exeinfo.cpp
@@ -982,7 +982,7 @@ main (int argc, char* argv[])
<< std::endl;
ec = 10;
}
- catch (std::exception e)
+ catch (std::exception& e)
{
int status;
char* realname;
diff --git a/linkers/rtems-ld.cpp b/linkers/rtems-ld.cpp
index eafbbbf..3075fe2 100644
--- a/linkers/rtems-ld.cpp
+++ b/linkers/rtems-ld.cpp
@@ -554,7 +554,7 @@ main (int argc, char* argv[])
<< std::endl;
ec = 10;
}
- catch (std::exception e)
+ catch (std::exception& e)
{
int status;
char* realname;
diff --git a/linkers/rtems-ra.cpp b/linkers/rtems-ra.cpp
index 04c1868..237626b 100644
--- a/linkers/rtems-ra.cpp
+++ b/linkers/rtems-ra.cpp
@@ -593,7 +593,7 @@ main (int argc, char* argv[])
<< std::endl;
ec = 10;
}
- catch (std::exception e)
+ catch (std::exception& e)
{
int status;
char* realname;
diff --git a/linkers/rtems-rapper.cpp b/linkers/rtems-rapper.cpp
index afc301d..ca239b4 100644
--- a/linkers/rtems-rapper.cpp
+++ b/linkers/rtems-rapper.cpp
@@ -1287,7 +1287,7 @@ main (int argc, char* argv[])
<< std::endl;
ec = 10;
}
- catch (std::exception e)
+ catch (std::exception& e)
{
int status;
char* realname;
diff --git a/linkers/rtems-syms.cpp b/linkers/rtems-syms.cpp
index 5ee2e58..58df50f 100644
--- a/linkers/rtems-syms.cpp
+++ b/linkers/rtems-syms.cpp
@@ -530,7 +530,7 @@ main (int argc, char* argv[])
<< std::endl;
ec = 10;
}
- catch (std::exception e)
+ catch (std::exception& e)
{
int status;
char* realname;
diff --git a/linkers/rtems-tld.cpp b/linkers/rtems-tld.cpp
index c405f39..7b42e45 100644
--- a/linkers/rtems-tld.cpp
+++ b/linkers/rtems-tld.cpp
@@ -1897,7 +1897,7 @@ main (int argc, char* argv[])
<< std::endl;
ec = 10;
}
- catch (std::exception e)
+ catch (std::exception& e)
{
int status;
char* realname;
diff --git a/misc/bin2c/rtems-bin2c.c b/misc/bin2c/rtems-bin2c.c
index 6381766..1e59ac5 100644
--- a/misc/bin2c/rtems-bin2c.c
+++ b/misc/bin2c/rtems-bin2c.c
@@ -57,8 +57,8 @@ void process(const char *ifname, const char *ofname, const char *forced_name)
FILE *ifile, *ocfile, *ohfile;
char buf[PATH_MAX+1], *p;
char obasename[PATH_MAX+1];
- char ocname[PATH_MAX+1];
- char ohname[PATH_MAX+1];
+ char ocname[PATH_MAX+5];
+ char ohname[PATH_MAX+5];
size_t len;
ocfile = NULL;
diff --git a/rtemstoolkit/ConvertUTF.c b/rtemstoolkit/ConvertUTF.c
index d849a4c..4263952 100644
--- a/rtemstoolkit/ConvertUTF.c
+++ b/rtemstoolkit/ConvertUTF.c
@@ -1,8 +1,8 @@
/*
* Copyright 2001-2004 Unicode, Inc.
- *
+ *
* Disclaimer
- *
+ *
* This source code is provided as is by Unicode, Inc. No claims are
* made as to fitness for any particular purpose. No warranties of any
* kind are expressed or implied. The recipient agrees to determine
@@ -10,9 +10,9 @@
* purchased on magnetic or optical media from Unicode, Inc., the
* sole remedy for any claim will be exchange of defective media
* within 90 days of receipt.
- *
+ *
* Limitations on Rights to Redistribute This Code
- *
+ *
* Unicode, Inc. hereby grants the right to freely use the information
* supplied in this file in the creation of products supporting the
* Unicode Standard, and to make copies of this file in any form
@@ -59,7 +59,7 @@ static const UTF32 halfMask = 0x3FFUL;
/* --------------------------------------------------------------------- */
ConversionResult ConvertUTF32toUTF16 (
- const UTF32** sourceStart, const UTF32* sourceEnd,
+ const UTF32** sourceStart, const UTF32* sourceEnd,
UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags) {
ConversionResult result = conversionOK;
const UTF32* source = *sourceStart;
@@ -108,7 +108,7 @@ ConversionResult ConvertUTF32toUTF16 (
/* --------------------------------------------------------------------- */
ConversionResult ConvertUTF16toUTF32 (
- const UTF16** sourceStart, const UTF16* sourceEnd,
+ const UTF16** sourceStart, const UTF16* sourceEnd,
UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags) {
ConversionResult result = conversionOK;
const UTF16* source = *sourceStart;
@@ -187,7 +187,7 @@ static const char trailingBytesForUTF8[256] = {
* This table contains as many values as there might be trailing bytes
* in a UTF-8 sequence.
*/
-static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL,
+static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL,
0x03C82080UL, 0xFA082080UL, 0x82082080UL };
/*
@@ -212,7 +212,7 @@ static const UTF8 firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC
/* --------------------------------------------------------------------- */
ConversionResult ConvertUTF16toUTF8 (
- const UTF16** sourceStart, const UTF16* sourceEnd,
+ const UTF16** sourceStart, const UTF16* sourceEnd,
UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags) {
ConversionResult result = conversionOK;
const UTF16* source = *sourceStart;
@@ -221,7 +221,7 @@ ConversionResult ConvertUTF16toUTF8 (
UTF32 ch;
unsigned short bytesToWrite = 0;
const UTF32 byteMask = 0xBF;
- const UTF32 byteMark = 0x80;
+ const UTF32 byteMark = 0x80;
const UTF16* oldSource = source; /* In case we have to back up because of target overflow. */
ch = *source++;
/* If we have a surrogate pair, convert to UTF32 first. */
@@ -310,7 +310,7 @@ static Boolean isLegalUTF8(const UTF8 *source, int length) {
case 0xF4: if (a > 0x8F) return false; break;
default: if (a < 0x80) return false; break;
}
-
+ /* FALLTHRU */
case 1: if (*source >= 0x80 && *source < 0xC2) return false; /* fall-thru */
}
if (*source > 0xF4) return false;
@@ -334,7 +334,7 @@ Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd) {
/* --------------------------------------------------------------------- */
ConversionResult ConvertUTF8toUTF16 (
- const UTF8** sourceStart, const UTF8* sourceEnd,
+ const UTF8** sourceStart, const UTF8* sourceEnd,
UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags) {
ConversionResult result = conversionOK;
const UTF8* source = *sourceStart;
@@ -407,7 +407,7 @@ ConversionResult ConvertUTF8toUTF16 (
/* --------------------------------------------------------------------- */
ConversionResult ConvertUTF32toUTF8 (
- const UTF32** sourceStart, const UTF32* sourceEnd,
+ const UTF32** sourceStart, const UTF32* sourceEnd,
UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags) {
ConversionResult result = conversionOK;
const UTF32* source = *sourceStart;
@@ -416,7 +416,7 @@ ConversionResult ConvertUTF32toUTF8 (
UTF32 ch;
unsigned short bytesToWrite = 0;
const UTF32 byteMask = 0xBF;
- const UTF32 byteMark = 0x80;
+ const UTF32 byteMark = 0x80;
ch = *source++;
if (flags == strictConversion ) {
/* UTF-16 surrogate values are illegal in UTF-32 */
@@ -438,7 +438,7 @@ ConversionResult ConvertUTF32toUTF8 (
ch = UNI_REPLACEMENT_CHAR;
result = sourceIllegal;
}
-
+
target += bytesToWrite;
if (target > targetEnd) {
--source; /* Back up source pointer! */
@@ -461,7 +461,7 @@ ConversionResult ConvertUTF32toUTF8 (
/* --------------------------------------------------------------------- */
ConversionResult ConvertUTF8toUTF32 (
- const UTF8** sourceStart, const UTF8* sourceEnd,
+ const UTF8** sourceStart, const UTF8* sourceEnd,
UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags) {
ConversionResult result = conversionOK;
const UTF8* source = *sourceStart;
diff --git a/rtemstoolkit/rld-dwarf.cpp b/rtemstoolkit/rld-dwarf.cpp
index e142c43..6f249bf 100644
--- a/rtemstoolkit/rld-dwarf.cpp
+++ b/rtemstoolkit/rld-dwarf.cpp
@@ -1903,8 +1903,6 @@ namespace rld
const std::string prefix,
int depth)
{
- dwarf_unsigned cu_offset = 0;
-
while (true)
{
dwarf_unsigned cu_next_offset = 0;
@@ -1932,8 +1930,6 @@ namespace rld
die_dump (sibling, out, prefix, depth);
die = sibling;
}
-
- cu_offset = cu_next_offset;
}
}