Fix build warnings for gcc 9 61/220961/1 accepted/tizen/unified/20191227.142740 submit/tizen/20191226.234511
authorSemun Lee <semun.lee@samsung.com>
Thu, 26 Dec 2019 05:40:41 +0000 (14:40 +0900)
committerSemun Lee <semun.lee@samsung.com>
Thu, 26 Dec 2019 05:40:41 +0000 (14:40 +0900)
Removed all the dynamic exception specification

Change-Id: I4fc666788e033c59247c07ebc98c84ed4010ab6e
Signed-off-by: Semun Lee <semun.lee@samsung.com>
12 files changed:
common/include/Channel.h
common/include/Exception.h
common/include/ReaderHelper.h
common/include/SessionHelper.h
server/ServerChannel.cpp
server/ServerReader.cpp
server/ServerResource.cpp
server/ServerSession.cpp
server/include/ServerChannel.h
server/include/ServerReader.h
server/include/ServerResource.h
server/include/ServerSession.h

index 1f6a75ea2b275f8ef0cc127cc39574a1cb7a444b..72498c98fae725aa9e649ca91e45b4652e65bc82 100644 (file)
@@ -63,13 +63,9 @@ namespace smartcard_service_api
                virtual int close(closeChannelCallback callback, void *userParam) = 0;
                virtual int transmit(const ByteArray &command, transmitCallback callback, void *userData) = 0;
 
-               virtual void closeSync()
-                       throw(ExceptionBase &, ErrorIO &, ErrorSecurity &,
-                       ErrorIllegalState &, ErrorIllegalParameter &) = 0;
+               virtual void closeSync() = 0;
 
-               virtual int transmitSync(const ByteArray &command, ByteArray &result)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &) = 0;
+               virtual int transmitSync(const ByteArray &command, ByteArray &result) = 0;
        };
 
        /* LCOV_EXCL_STOP */
index 2f3aa8f35b6fcfcf7612d7a7660e82b41b8faaa7..8dc9f9e512619a13ea7a343c5b3307b44f665604 100644 (file)
@@ -222,8 +222,6 @@ namespace smartcard_service_api
        {
        public :
                static void throwError(int errorCode)
-                       throw(ExceptionBase &, ErrorIO &, ErrorSecurity &,
-                               ErrorIllegalState &, ErrorIllegalParameter &)
                {
                        switch (errorCode)
                        {
index f9954ddfd9e74970372a59acfac08ce5467775b7..13243f2ba612f89ec54fc3207ac84d073c14996d 100644 (file)
@@ -55,13 +55,10 @@ namespace smartcard_service_api
                inline SEServiceHelper *getSEService() const { return seService; }
                inline bool isSecureElementPresent() const { return present; }
 
-               virtual void closeSessions()
-                       throw(ErrorIO &, ErrorIllegalState &) = 0;
+               virtual void closeSessions() = 0;
 
                virtual int openSession(openSessionCallback callback, void *userData) = 0;
-               virtual SessionHelper *openSessionSync()
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &)= 0;
+               virtual SessionHelper *openSessionSync() = 0;
        };
 
        /* LCOV_EXCL_STOP */
index 85a15c1f640f9836a97c5bffe0ad9007ed186917..5c0d2a187e95b9af7223565640cd090710217ba3 100644 (file)
@@ -55,8 +55,7 @@ namespace smartcard_service_api
                ReaderHelper *getReader() const throw() { return reader; }
                bool isClosed() const throw() { return closed; }
 
-               virtual void closeChannels()
-                       throw(ErrorIO &, ErrorIllegalState &) = 0;
+               virtual void closeChannels() = 0;
 
                virtual int getATR(getATRCallback callback, void *userData) = 0;
                virtual int close(closeSessionCallback callback, void *userData) = 0;
@@ -66,45 +65,25 @@ namespace smartcard_service_api
                virtual int openLogicalChannel(const ByteArray &aid, openChannelCallback callback, void *userData) = 0;
                virtual int openLogicalChannel(const unsigned char *aid, unsigned int length, openChannelCallback callback, void *userData) = 0;
 
-               virtual const ByteArray getATRSync()
-                       throw(ExceptionBase &, ErrorIO &, ErrorSecurity &,
-                       ErrorIllegalState &, ErrorIllegalParameter &) = 0;
+               virtual const ByteArray getATRSync() = 0;
 
-               virtual void closeSync()
-                       throw(ExceptionBase &, ErrorIO &, ErrorSecurity &,
-                       ErrorIllegalState &, ErrorIllegalParameter &) = 0;
+               virtual void closeSync() = 0;
 
-               virtual Channel *openBasicChannelSync(const ByteArray &aid)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &) = 0;
+               virtual Channel *openBasicChannelSync(const ByteArray &aid) = 0;
 
-               virtual Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &) = 0;
+               virtual Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length) = 0;
 
-               virtual Channel *openLogicalChannelSync(const ByteArray &aid)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &) = 0;
+               virtual Channel *openLogicalChannelSync(const ByteArray &aid) = 0;
 
-               virtual Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &) = 0;
+               virtual Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length) = 0;
 
-               virtual Channel *openBasicChannelSync(const ByteArray &aid, unsigned char P2)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &) = 0;
+               virtual Channel *openBasicChannelSync(const ByteArray &aid, unsigned char P2) = 0;
 
-               virtual Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &) = 0;
+               virtual Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2) = 0;
 
-               virtual Channel *openLogicalChannelSync(const ByteArray &aid, unsigned char P2)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &) = 0;
+               virtual Channel *openLogicalChannelSync(const ByteArray &aid, unsigned char P2) = 0;
 
-               virtual Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2)
-                       throw(ExceptionBase &, ErrorIO &, ErrorIllegalState &,
-                               ErrorIllegalParameter &, ErrorSecurity &) = 0;
+               virtual Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2) = 0;
        };
 
        /* LCOV_EXCL_STOP */
index 42b69294213138f9a7b0df20dac9e2f537b23bdf..b2eab144b06ffb10e66bd275d91281f0d36a8645 100644 (file)
@@ -43,7 +43,6 @@ namespace smartcard_service_api
        }
 
        void ServerChannel::closeSync()
-               throw(ErrorIO &, ErrorIllegalState &)
        {
                ByteArray command, result;
                APDUHelper apdu;
@@ -74,7 +73,6 @@ namespace smartcard_service_api
        }
 
        int ServerChannel::transmitSync(const ByteArray &command, ByteArray &result)
-               throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &)
        {
                int ret = -1;
                APDUCommand helper;
index 877f7c2e1e326a2c56e9d62714515160a53dd92a..b0c857468d83e20cf655f00bd47029cce5d402cf 100644 (file)
@@ -53,7 +53,6 @@ namespace smartcard_service_api
        }
 
        void ServerReader::closeSessions()
-               throw(ErrorIO &, ErrorIllegalState &)
        {
                size_t i;
 
@@ -67,7 +66,6 @@ namespace smartcard_service_api
        }
 
        ServerSession *ServerReader::openSessionSync()
-               throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &)
        {
                vector<ByteArray> temp;
 
@@ -75,7 +73,6 @@ namespace smartcard_service_api
        }
 
        ServerSession *ServerReader::openSessionSync(const vector<ByteArray> &certHashes, void *caller)
-               throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &)
        {
                ServerSession *session = NULL;
 
index 55e0d8f0b40ae84d0d9a62bc83ad1444922a6dcb..553da2070e0eb5897e9284dfad47710e1d7aa542 100755 (executable)
@@ -291,7 +291,6 @@ namespace smartcard_service_api
        }
 
        unsigned int ServerResource::createChannel(const char *name, unsigned int handle, unsigned int sessionID, int channelType, ByteArray aid)
-               throw(ExceptionBase &)
        {
                unsigned int result = -1;
                ServiceInstance *service = NULL;
@@ -555,7 +554,6 @@ namespace smartcard_service_api
        unsigned int ServerResource::_createChannel(Terminal *terminal,
                ServiceInstance *service, int channelType,
                unsigned int sessionID, const ByteArray &aid)
-               throw(ExceptionBase &)
        {
                unsigned int result = IntegerHandle::INVALID_HANDLE;
                int channelNum = 0;
index c0c6ac9fd68bfb52eac72017d041e27985ddfc12..829dcbe0f95c6531b68177f569ec60d96146eeb5 100644 (file)
@@ -55,7 +55,6 @@ namespace smartcard_service_api
        }
 
        const ByteArray ServerSession::getATRSync()
-               throw(ErrorIO &, ErrorIllegalState &)
        {
                /* call get atr to terminal */
                if (atr.isEmpty()) {
@@ -80,7 +79,6 @@ namespace smartcard_service_api
        }
 
        void ServerSession::closeSync()
-               throw(ErrorIO &, ErrorIllegalState &)
        {
                if (isClosed() == false)
                {
@@ -90,7 +88,6 @@ namespace smartcard_service_api
        }
 
        void ServerSession::closeChannels()
-               throw(ErrorIO &, ErrorIllegalState &)
        {
                size_t i;
 
@@ -104,19 +101,16 @@ namespace smartcard_service_api
        }
 
        Channel *ServerSession::openBasicChannelSync(const ByteArray &aid)
-               throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &)
        {
                return openBasicChannelSync(aid, (void *)NULL);
        }
 
        Channel *ServerSession::openBasicChannelSync(const ByteArray &aid, unsigned char P2)
-               throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &)
        {
                return openBasicChannelSync(aid, (void *)NULL);
        }
 
        Channel *ServerSession::openBasicChannelSync(const ByteArray &aid, void *caller)
-               throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &)
        {
                ServerChannel *channel = NULL;
 #if 0
@@ -166,7 +160,6 @@ namespace smartcard_service_api
        }
 
        Channel *ServerSession::openBasicChannelSync(const unsigned char *aid, unsigned int length)
-               throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &)
        {
                unsigned char P2 = 0x00;
                ByteArray temp(aid, length);
@@ -175,7 +168,6 @@ namespace smartcard_service_api
        }
 
        Channel *ServerSession::openBasicChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2)
-               throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &)
        {
                ByteArray temp(aid, length);
 
@@ -183,7 +175,6 @@ namespace smartcard_service_api
        }
 
        Channel *ServerSession::openBasicChannelSync(const unsigned char *aid, unsigned int length, void *caller)
-               throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &)
        {
                ByteArray temp(aid, length);
 
@@ -191,21 +182,18 @@ namespace smartcard_service_api
        }
 
        Channel *ServerSession::openLogicalChannelSync(const ByteArray &aid)
-               throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &)
        {
                void* caller = NULL;
                return openLogicalChannelSync(aid, caller);
        }
 
        Channel *ServerSession::openLogicalChannelSync(const ByteArray &aid, unsigned char P2)
-               throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &)
        {
                void* caller = NULL;
                return openLogicalChannelSync(aid, caller);
        }
 
        Channel *ServerSession::openLogicalChannelSync(const ByteArray &aid, void *caller)
-               throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &)
        {
                ServerChannel *channel = NULL;
 #if 0
@@ -276,7 +264,6 @@ namespace smartcard_service_api
        }
 
        Channel *ServerSession::openLogicalChannelSync(const unsigned char *aid, unsigned int length)
-               throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &)
        {
                unsigned char P2 = 0x00;
                ByteArray temp(aid, length);
@@ -285,7 +272,6 @@ namespace smartcard_service_api
        }
 
        Channel *ServerSession::openLogicalChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2)
-               throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &)
        {
                ByteArray temp(aid, length);
 
@@ -293,7 +279,6 @@ namespace smartcard_service_api
        }
 
        Channel *ServerSession::openLogicalChannelSync(const unsigned char *aid, unsigned int length, void *caller)
-               throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &)
        {
                ByteArray temp(aid, length);
 
index cb27435c99afbd464b85172ab970b8205c022b0a..4cc6f508444acf1f91ba9ec74f93a02356f1d1b5 100644 (file)
@@ -41,10 +41,8 @@ namespace smartcard_service_api
                void unsetPrivilegeMode() { this->privilege = false; }
 
        protected:
-               void closeSync()
-                       throw(ErrorIO &, ErrorIllegalState &);
-               int transmitSync(const ByteArray &command, ByteArray &result)
-                       throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &);
+               void closeSync();
+               int transmitSync(const ByteArray &command, ByteArray &result);
 
        public:
                ~ServerChannel();
index f29b21a5a1cc9634166bf150c9247292c34e1738..7695a9ab15a5ece09535abd29bf81268d20ceeb3 100644 (file)
@@ -48,13 +48,10 @@ namespace smartcard_service_api
                int openSession(void *caller, openSessionCallback callback, void *userData) { return -1; }
 
        public:
-               void closeSessions()
-                       throw(ErrorIO &, ErrorIllegalState &);
+               void closeSessions();
 
-               ServerSession *openSessionSync()
-                       throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &);
-               ServerSession *openSessionSync(const vector<ByteArray> &certHashes, void *caller)
-                       throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &);
+               ServerSession *openSessionSync();
+               ServerSession *openSessionSync(const vector<ByteArray> &certHashes, void *caller);
 
                friend class ServerSEService;
        };
index 35b5de209adc16c6d4c9457d25be5d7fe943b776..18f15b72e0fdf8cbf7f5734751ca6b5dc59b5f26 100644 (file)
@@ -75,8 +75,7 @@ namespace smartcard_service_api
                int _openLogicalChannel(Terminal *terminal);
                int _closeLogicalChannel(Terminal *terminal, int channelNum);
                bool _isAuthorizedAccess(ServerChannel *channel, const ByteArray &aid, const vector<ByteArray> &hashes);
-               unsigned int _createChannel(Terminal *terminal, ServiceInstance *service, int channelType, unsigned int sessionID, const ByteArray &aid)
-                       throw(ExceptionBase &);
+               unsigned int _createChannel(Terminal *terminal, ServiceInstance *service, int channelType, unsigned int sessionID, const ByteArray &aid);
 
        public:
                /* static member */
@@ -118,8 +117,7 @@ namespace smartcard_service_api
                bool isValidChannelHandle(const char *name, unsigned int handle, unsigned int channelID);
 
                unsigned int createChannel(const char *name, unsigned int handle,
-                       unsigned int sessionID, int channelType, ByteArray aid)
-                       throw(ExceptionBase &);
+                       unsigned int sessionID, int channelType, ByteArray aid);
                Channel *getChannel(const char *name, unsigned int handle, unsigned int channelID);
                void removeChannel(const char *name, unsigned int handle, unsigned int channelID);
                void addAccessControlList(Terminal *terminal, AccessControlList *acl);
index 0d296f7094bd63246fc87b1390eccc381527d60f..abb63576e28bcbffd80e80ce21a50479386fa0ef 100644 (file)
@@ -56,39 +56,24 @@ namespace smartcard_service_api
        public:
                ~ServerSession();
 
-               const ByteArray getATRSync()
-                       throw(ErrorIO &, ErrorIllegalState &);
-               void closeSync()
-                       throw(ErrorIO &, ErrorIllegalState &);
-
-               void closeChannels()
-                       throw(ErrorIO &, ErrorIllegalState &);
-
-               Channel *openBasicChannelSync(const ByteArray &aid)
-                       throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &);
-               Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length)
-                       throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &);
-               Channel *openBasicChannelSync(const ByteArray &aid, unsigned char P2)
-                       throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &);
-               Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2)
-                       throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &);
-               Channel *openBasicChannelSync(const ByteArray &aid, void *caller)
-                       throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &);
-               Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length, void *caller)
-                       throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &);
-
-               Channel *openLogicalChannelSync(const ByteArray &aid)
-                       throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &);
-               Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length)
-                       throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &);
-               Channel *openLogicalChannelSync(const ByteArray &aid, unsigned char P2)
-                       throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &);
-               Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2)
-                       throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &);
-               Channel *openLogicalChannelSync(const ByteArray &aid, void *caller)
-                       throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &);
-               Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length, void *caller)
-                       throw(ErrorIO &, ErrorIllegalState &, ErrorIllegalParameter &, ErrorSecurity &);
+               const ByteArray getATRSync();
+               void closeSync();
+
+               void closeChannels();
+
+               Channel *openBasicChannelSync(const ByteArray &aid);
+               Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length);
+               Channel *openBasicChannelSync(const ByteArray &aid, unsigned char P2);
+               Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2);
+               Channel *openBasicChannelSync(const ByteArray &aid, void *caller);
+               Channel *openBasicChannelSync(const unsigned char *aid, unsigned int length, void *caller);
+
+               Channel *openLogicalChannelSync(const ByteArray &aid);
+               Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length);
+               Channel *openLogicalChannelSync(const ByteArray &aid, unsigned char P2);
+               Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length, unsigned char P2);
+               Channel *openLogicalChannelSync(const ByteArray &aid, void *caller);
+               Channel *openLogicalChannelSync(const unsigned char *aid, unsigned int length, void *caller);
 
                friend class ServerReader;
                friend class ServerResource;