Opened 7 years ago

Closed 6 years ago

#14146 closed bug (fixed)

Fix catching polymorphic type by value

Reported by: mt Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: - General Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

https://review.haiku-os.org/#/c/haiku/+/192/

Replace catching polymorphic type std::bad_alloc 'by value' with 'by reference'.

Pointed out by gcc8 [-Werror=catch-value=]

/home/haiku/haiku/haiku/src/kits/storage/storage_support.cpp: In function 'status_t BPrivate::Storage::split_path(const char*, char**, char**)':
/home/haiku/haiku/haiku/src/kits/storage/storage_support.cpp:275:26: error: catching polymorphic type 'class std::bad_alloc' by value [-Werror=catch-value=]
  } catch (std::bad_alloc exception) {
                          ^~~~~~~~~

Change History (1)

comment:1 by waddlesplash, 6 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.