From 95d4ed6778c138150a29a435d2683adc1beb3692 Mon Sep 17 00:00:00 2001 From: Jonathan Schleifer Date: Sat, 7 Nov 2015 18:06:38 +0100 Subject: [PATCH] Add missing "using std::nothrow" --- src/system/boot/loader/FileMapDisk.cpp | 4 ++++ src/system/boot/loader/file_systems/amiga_ffs/Directory.cpp | 3 +++ src/system/boot/loader/file_systems/amiga_ffs/File.cpp | 3 +++ src/system/boot/loader/file_systems/amiga_ffs/Volume.cpp | 1 + src/system/boot/loader/file_systems/bfs/Directory.cpp | 3 +++ src/system/boot/loader/file_systems/bfs/Stream.cpp | 1 + src/system/boot/loader/file_systems/bfs/bfs.cpp | 1 + src/system/boot/loader/file_systems/fat/Directory.cpp | 3 +++ src/system/boot/loader/file_systems/fat/Volume.cpp | 1 + src/system/boot/loader/file_systems/tarfs/tarfs.cpp | 4 ++++ src/system/boot/loader/net/NetStack.cpp | 3 +++ src/system/boot/loader/net/RemoteDisk.cpp | 4 ++++ src/system/boot/loader/net/UDP.cpp | 3 +++ 13 files changed, 34 insertions(+) diff --git a/src/system/boot/loader/FileMapDisk.cpp b/src/system/boot/loader/FileMapDisk.cpp index 89dc832b5c..06b2cd67c9 100644 --- a/src/system/boot/loader/FileMapDisk.cpp +++ b/src/system/boot/loader/FileMapDisk.cpp @@ -24,6 +24,10 @@ # define TRACE(x) ; #endif + +using std::nothrow; + + // constructor FileMapDisk::FileMapDisk() : diff --git a/src/system/boot/loader/file_systems/amiga_ffs/Directory.cpp b/src/system/boot/loader/file_systems/amiga_ffs/Directory.cpp index f0325a617d..43ea058d50 100644 --- a/src/system/boot/loader/file_systems/amiga_ffs/Directory.cpp +++ b/src/system/boot/loader/file_systems/amiga_ffs/Directory.cpp @@ -15,6 +15,9 @@ #include +using std::nothrow; + + namespace FFS { diff --git a/src/system/boot/loader/file_systems/amiga_ffs/File.cpp b/src/system/boot/loader/file_systems/amiga_ffs/File.cpp index f75be4f8ff..7222fb3ea0 100644 --- a/src/system/boot/loader/file_systems/amiga_ffs/File.cpp +++ b/src/system/boot/loader/file_systems/amiga_ffs/File.cpp @@ -11,6 +11,9 @@ #include +using std::nothrow; + + namespace FFS { diff --git a/src/system/boot/loader/file_systems/amiga_ffs/Volume.cpp b/src/system/boot/loader/file_systems/amiga_ffs/Volume.cpp index 295ff39f9d..996d2a1173 100644 --- a/src/system/boot/loader/file_systems/amiga_ffs/Volume.cpp +++ b/src/system/boot/loader/file_systems/amiga_ffs/Volume.cpp @@ -18,6 +18,7 @@ using namespace FFS; +using std::nothrow; Volume::Volume(boot::Partition *partition) diff --git a/src/system/boot/loader/file_systems/bfs/Directory.cpp b/src/system/boot/loader/file_systems/bfs/Directory.cpp index dda1c40bc7..ce1a688630 100644 --- a/src/system/boot/loader/file_systems/bfs/Directory.cpp +++ b/src/system/boot/loader/file_systems/bfs/Directory.cpp @@ -19,6 +19,9 @@ extern Node *get_node_from(int fd); +using std::nothrow; + + namespace BFS { diff --git a/src/system/boot/loader/file_systems/bfs/Stream.cpp b/src/system/boot/loader/file_systems/bfs/Stream.cpp index 4cdea7dd85..47a20e4816 100644 --- a/src/system/boot/loader/file_systems/bfs/Stream.cpp +++ b/src/system/boot/loader/file_systems/bfs/Stream.cpp @@ -18,6 +18,7 @@ using namespace BFS; +using std::nothrow; class CachedBlock { diff --git a/src/system/boot/loader/file_systems/bfs/bfs.cpp b/src/system/boot/loader/file_systems/bfs/bfs.cpp index 2bb31f95a6..f32e4bae78 100644 --- a/src/system/boot/loader/file_systems/bfs/bfs.cpp +++ b/src/system/boot/loader/file_systems/bfs/bfs.cpp @@ -27,6 +27,7 @@ using namespace BFS; +using std::nothrow; Volume::Volume(boot::Partition *partition) diff --git a/src/system/boot/loader/file_systems/fat/Directory.cpp b/src/system/boot/loader/file_systems/fat/Directory.cpp index 87a8f3f2af..559dae6d68 100644 --- a/src/system/boot/loader/file_systems/fat/Directory.cpp +++ b/src/system/boot/loader/file_systems/fat/Directory.cpp @@ -26,6 +26,9 @@ #define TRACE(x) do {} while (0) +using std::nothrow; + + namespace FATFS { diff --git a/src/system/boot/loader/file_systems/fat/Volume.cpp b/src/system/boot/loader/file_systems/fat/Volume.cpp index a6cbd35a5f..28b2dbcd24 100644 --- a/src/system/boot/loader/file_systems/fat/Volume.cpp +++ b/src/system/boot/loader/file_systems/fat/Volume.cpp @@ -24,6 +24,7 @@ using namespace FATFS; +using std::nothrow; Volume::Volume(boot::Partition *partition) diff --git a/src/system/boot/loader/file_systems/tarfs/tarfs.cpp b/src/system/boot/loader/file_systems/tarfs/tarfs.cpp index f5c19f7080..83e29e3b9f 100644 --- a/src/system/boot/loader/file_systems/tarfs/tarfs.cpp +++ b/src/system/boot/loader/file_systems/tarfs/tarfs.cpp @@ -37,6 +37,10 @@ static const uint32 kFloppyArchiveOffset = BOOT_ARCHIVE_IMAGE_OFFSET * 1024; // defined at build time, see build/jam/BuildSetup static const size_t kTarRegionSize = 8 * 1024 * 1024; // 8 MB + +using std::nothrow; + + namespace TarFS { diff --git a/src/system/boot/loader/net/NetStack.cpp b/src/system/boot/loader/net/NetStack.cpp index 52b354387d..7a172eeb4c 100644 --- a/src/system/boot/loader/net/NetStack.cpp +++ b/src/system/boot/loader/net/NetStack.cpp @@ -16,6 +16,9 @@ #include +using std::nothrow; + + // sNetStack NetStack *NetStack::sNetStack = NULL; diff --git a/src/system/boot/loader/net/RemoteDisk.cpp b/src/system/boot/loader/net/RemoteDisk.cpp index b78e5fa01d..6778f716c5 100644 --- a/src/system/boot/loader/net/RemoteDisk.cpp +++ b/src/system/boot/loader/net/RemoteDisk.cpp @@ -18,6 +18,10 @@ static const bigtime_t kRequestTimeout = 100000LL; + +using std::nothrow; + + #if __BYTE_ORDER == __LITTLE_ENDIAN static inline diff --git a/src/system/boot/loader/net/UDP.cpp b/src/system/boot/loader/net/UDP.cpp index 205ddc61b8..10af060bc4 100644 --- a/src/system/boot/loader/net/UDP.cpp +++ b/src/system/boot/loader/net/UDP.cpp @@ -22,6 +22,9 @@ #endif +using std::nothrow; + + // #pragma mark - UDPPacket