From: Semun Lee Date: Thu, 26 Dec 2019 01:54:40 +0000 (+0900) Subject: Fix build warnings for gcc 9 X-Git-Tag: submit/tizen/20191226.234511^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11a15163fcfb756ed05bdd48e1e2e34364575914;p=platform%2Fcore%2Fapi%2Fsmartcard.git Fix build warnings for gcc 9 Removed all the dynamic exception specifications which are deprecated since c++11 Change-Id: I1ca350acd7d7f0e189d6d7df815140bf8c6d8839 Signed-off-by: Semun Lee --- diff --git a/include/ClientChannel.h b/include/ClientChannel.h index e02d3f2..c735176 100644 --- a/include/ClientChannel.h +++ b/include/ClientChannel.h @@ -56,12 +56,8 @@ public: transmitCallback callback, void *userParam); bool selectNext() { return false; } - void closeSync() - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorSecurity &, ErrorIllegalParameter &); - int transmitSync(const ByteArray &command, ByteArray &result) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &); + void closeSync(); + int transmitSync(const ByteArray &command, ByteArray &result); void *getHandle() { return handle; } diff --git a/include/Reader.h b/include/Reader.h index ea3e30b..5e19944 100644 --- a/include/Reader.h +++ b/include/Reader.h @@ -50,13 +50,10 @@ private: GAsyncResult *res, gpointer user_data); public: - void closeSessions() - throw(ErrorIO &, ErrorIllegalState &); + void closeSessions(); int openSession(openSessionCallback callback, void *userData); - SessionHelper *openSessionSync() - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &); + SessionHelper *openSessionSync(); void *getHandle() { return handle; } diff --git a/include/SEService.h b/include/SEService.h index b8bbb35..8efea8b 100644 --- a/include/SEService.h +++ b/include/SEService.h @@ -59,17 +59,12 @@ private: bool parseReaderInformation(unsigned int count, const ByteArray &data); bool parseReaderInformation(GVariant *variant); - bool _initialize() - throw(ErrorIO &); - bool initialize(void *context, serviceConnected handler) - throw(ErrorIO &, ErrorIllegalParameter &); - bool initialize(void *context, SEServiceListener *listener) - throw(ErrorIO &, ErrorIllegalParameter &); - int _initialize_sync() - throw(ErrorIO &, ExceptionBase &); + bool _initialize(); + bool initialize(void *context, serviceConnected handler); + bool initialize(void *context, SEServiceListener *listener); + int _initialize_sync(); int _initialize_sync_do_not_throw_exception(); - bool initializeSync(void *context) - throw(ErrorIO &, ErrorIllegalParameter &, ExceptionBase &); + bool initializeSync(void *context); static void reader_inserted(GObject *source_object, guint reader_id, gchar *reader_name, @@ -83,12 +78,9 @@ private: GAsyncResult *res, gpointer user_data); public: - SEService(void *user_data, serviceConnected handler) - throw(ErrorIO &, ErrorIllegalParameter &); - SEService(void *user_data, SEServiceListener *listener) - throw(ErrorIO &, ErrorIllegalParameter &); - SEService(void *user_data) - throw(ErrorIO &, ErrorIllegalParameter &, ExceptionBase &); + SEService(void *user_data, serviceConnected handler); + SEService(void *user_data, SEServiceListener *listener); + SEService(void *user_data); ~SEService(); void setEventHandler(se_service_event_cb cb, void *context); diff --git a/include/Session.h b/include/Session.h index 54e2b5a..fdf7f53 100644 --- a/include/Session.h +++ b/include/Session.h @@ -47,13 +47,9 @@ private: int openChannel(int id, const ByteArray &aid, openChannelCallback callback, void *userData); - Channel *openChannelSync(int id, const ByteArray &aid) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &); + Channel *openChannelSync(int id, const ByteArray &aid); - Channel *openChannelSync(int id, const ByteArray &aid, unsigned char P2) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &); + Channel *openChannelSync(int id, const ByteArray &aid, unsigned char P2); static void session_get_atr_cb(GObject *source_object, GAsyncResult *res, gpointer user_data); @@ -63,8 +59,7 @@ private: GAsyncResult *res, gpointer user_data); public: - void closeChannels() - throw(ErrorIO &, ErrorIllegalState &); + void closeChannels(); int getATR(getATRCallback callback, void *userData); int close(closeSessionCallback callback, void *userData); @@ -74,45 +69,25 @@ public: int openLogicalChannel(const ByteArray &aid, openChannelCallback callback, void *userData); int openLogicalChannel(const unsigned char *aid, unsigned int length, openChannelCallback callback, void *userData); - const ByteArray getATRSync() - throw(ExceptionBase &, ErrorIO &, ErrorSecurity &, - ErrorIllegalState &, ErrorIllegalParameter &); + const ByteArray getATRSync(); - void closeSync() - throw(ExceptionBase &, ErrorIO &, ErrorSecurity &, - ErrorIllegalState &, ErrorIllegalParameter &); + void closeSync(); - Channel *openBasicChannelSync(const ByteArray &aid) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &); + Channel *openBasicChannelSync(const ByteArray &aid); - Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &); + Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length); - Channel *openLogicalChannelSync(const ByteArray &aid) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &); + Channel *openLogicalChannelSync(const ByteArray &aid); - Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &); + Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length); - Channel *openBasicChannelSync(const ByteArray &aid, unsigned char P2) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &); + Channel *openBasicChannelSync(const ByteArray &aid, unsigned char P2); - Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &); + Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2); - Channel *openLogicalChannelSync(const ByteArray &aid, unsigned char P2) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &); + Channel *openLogicalChannelSync(const ByteArray &aid, unsigned char P2); - Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &); + Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2); size_t getChannelCount() const; void *getHandle() { return handle; } diff --git a/src/ClientChannel.cpp b/src/ClientChannel.cpp index 3f515ec..0d905d8 100755 --- a/src/ClientChannel.cpp +++ b/src/ClientChannel.cpp @@ -163,8 +163,6 @@ namespace smartcard_service_api } void ClientChannel::closeSync() - throw(ExceptionBase &, ErrorIO &, ErrorSecurity &, - ErrorIllegalState &, ErrorIllegalParameter &) { if (isClosed() == false) { @@ -228,8 +226,6 @@ namespace smartcard_service_api } int ClientChannel::transmitSync(const ByteArray &command, ByteArray &result) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &) { int rv = SCARD_ERROR_OK; diff --git a/src/Reader.cpp b/src/Reader.cpp index 13f812a..e91f301 100755 --- a/src/Reader.cpp +++ b/src/Reader.cpp @@ -82,7 +82,6 @@ namespace smartcard_service_api } void Reader::closeSessions() - throw(ErrorIO &, ErrorIllegalState &) { size_t i; @@ -93,8 +92,6 @@ namespace smartcard_service_api } SessionHelper *Reader::openSessionSync() - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &) { Session *session = NULL; diff --git a/src/SEService.cpp b/src/SEService.cpp index 35ba27c..71450d1 100644 --- a/src/SEService.cpp +++ b/src/SEService.cpp @@ -47,8 +47,7 @@ namespace smartcard_service_api } SEService::SEService(void *user_data, serviceConnected handler) - throw(ErrorIO &, ErrorIllegalParameter &) : - SEServiceHelper(), handle(-1), context(NULL), listener(NULL), + : SEServiceHelper(), handle(-1), context(NULL), listener(NULL), event_handler(NULL), event_handler_context(NULL), proxy(NULL), version(VERSION) { @@ -56,8 +55,7 @@ namespace smartcard_service_api } SEService::SEService(void *user_data, SEServiceListener *listener) - throw(ErrorIO &, ErrorIllegalParameter &) : - SEServiceHelper(), handle(-1), handler(NULL), + : SEServiceHelper(), handle(-1), handler(NULL), event_handler(NULL), event_handler_context(NULL), proxy(NULL), version(VERSION) { @@ -65,8 +63,7 @@ namespace smartcard_service_api } SEService::SEService(void *user_data) - throw(ErrorIO &, ErrorIllegalParameter &, ExceptionBase &) : - SEServiceHelper(), handle(-1), handler(NULL), listener(NULL), + : SEServiceHelper(), handle(-1), handler(NULL), listener(NULL), event_handler(NULL), event_handler_context(NULL), proxy(NULL), version(VERSION) { @@ -252,7 +249,7 @@ namespace smartcard_service_api } } - bool SEService::_initialize() throw(ErrorIO &) + bool SEService::_initialize() { bool result = false; @@ -349,7 +346,7 @@ namespace smartcard_service_api return result; } - int SEService::_initialize_sync() throw(ErrorIO &, ExceptionBase &) + int SEService::_initialize_sync() { gint result; guint handle; @@ -402,7 +399,6 @@ namespace smartcard_service_api } bool SEService::initialize(void *context, serviceConnected handler) - throw(ErrorIO &, ErrorIllegalParameter &) { if (context == NULL) { @@ -416,7 +412,6 @@ namespace smartcard_service_api } bool SEService::initialize(void *context, SEServiceListener *listener) - throw(ErrorIO &, ErrorIllegalParameter &) { if (context == NULL) { @@ -430,7 +425,6 @@ namespace smartcard_service_api } bool SEService::initializeSync(void *context) - throw(ErrorIO &, ErrorIllegalParameter &, ExceptionBase &) { this->context = context; diff --git a/src/Session.cpp b/src/Session.cpp index 4270e4e..a600e1d 100755 --- a/src/Session.cpp +++ b/src/Session.cpp @@ -84,7 +84,7 @@ namespace smartcard_service_api channels.clear(); } - void Session::closeChannels() throw(ErrorIO &, ErrorIllegalState &) + void Session::closeChannels() { size_t i; @@ -243,8 +243,6 @@ namespace smartcard_service_api } const ByteArray Session::getATRSync() - throw(ExceptionBase &, ErrorIO &, ErrorSecurity &, - ErrorIllegalState &, ErrorIllegalParameter &) { ByteArray result; @@ -321,8 +319,6 @@ namespace smartcard_service_api } void Session::closeSync() - throw(ExceptionBase &, ErrorIO &, ErrorSecurity &, - ErrorIllegalState &, ErrorIllegalParameter &) { if (isClosed() == false) { @@ -392,15 +388,11 @@ namespace smartcard_service_api return count; } Channel *Session::openChannelSync(int id, const ByteArray &aid) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &) { return openChannelSync(id, aid, 0x00); } Channel *Session::openChannelSync(int id, const ByteArray &aid, unsigned char P2) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &) { Channel *channel = NULL; @@ -488,22 +480,16 @@ namespace smartcard_service_api } Channel *Session::openBasicChannelSync(const ByteArray &aid) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &) { return openChannelSync(0, aid, 0x00); } Channel *Session::openBasicChannelSync(const ByteArray &aid, unsigned char P2) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &) { return openChannelSync(0, aid, P2); } Channel *Session::openBasicChannelSync(const unsigned char *aid, unsigned int length) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &) { ByteArray temp(aid, length); @@ -511,8 +497,6 @@ namespace smartcard_service_api } Channel *Session::openBasicChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &) { ByteArray temp(aid, length); @@ -533,22 +517,16 @@ namespace smartcard_service_api } Channel *Session::openLogicalChannelSync(const ByteArray &aid) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &) { return openChannelSync(1, aid, 0x00); } Channel *Session::openLogicalChannelSync(const ByteArray &aid, unsigned char P2) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &) { return openChannelSync(1, aid, P2); } Channel *Session::openLogicalChannelSync(const unsigned char *aid, unsigned int length) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &) { ByteArray temp(aid, length); @@ -556,8 +534,6 @@ namespace smartcard_service_api } Channel *Session::openLogicalChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2) - throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &, - ErrorIllegalParameter &, ErrorSecurity &) { ByteArray temp(aid, length);