Fix issues found by using new toolchain 32/295432/2
authorTomasz Swierczek <t.swierczek@samsung.com>
Fri, 7 Jul 2023 06:25:09 +0000 (08:25 +0200)
committerTomasz Swierczek <t.swierczek@samsung.com>
Fri, 7 Jul 2023 06:27:52 +0000 (08:27 +0200)
Change-Id: I5f2acf2ed72659983d4664082f5758141cdd449a

src/capi/impl/privacy_privilege_manager.c
src/capi/test/privacy_privilege_manager_test.cpp

index b494ea53c6155dc876a7c55e6f6d13d7f9cfb4be..b397bd05f0f6ef046f331a91e1f4177a54bcc367 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2017-2020 Samsung Electronics Co., Ltd. All rights reserved
+ *  Copyright (c) 2017-2023 Samsung Electronics Co., Ltd. All rights reserved
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -131,7 +131,7 @@ static ppm_call_cause_e askuser_client_request_cause_to_ppm(askuser_call_cause c
             return PRIVACY_PRIVILEGE_MANAGER_CALL_CAUSE_ERROR;
     }
 
-    return ASKUSER_CALL_CAUSE_ERROR;
+    return PRIVACY_PRIVILEGE_MANAGER_CALL_CAUSE_ERROR;
 }
 
 static int g_io_condition_to_askuser_events(GIOCondition cond)
@@ -223,7 +223,7 @@ static void ppm_popup_response_callback(UNUSED int request_id, askuser_call_caus
     }
 
     ppm_call_cause_e ppm_cause = askuser_client_request_cause_to_ppm(cause);
-    ppm_check_result_e ppm_result = askuser_client_request_result_to_ppm(result);
+    ppm_request_result_e ppm_result = askuser_client_request_result_to_ppm(result);
 
     callback_closure->callback(ppm_cause, ppm_result, privilege, callback_closure->user_data);
 
@@ -249,7 +249,7 @@ static void ppm_popup_multiple_response_callback(UNUSED int request_id, askuser_
     ppm_request_result_e *ppm_results = malloc(privileges_count * sizeof(ppm_request_result_e));
 
     if (!ppm_results) {
-        callback_closure->callback(ASKUSER_CALL_CAUSE_ERROR, NULL, privileges, privileges_count, callback_closure->user_data);
+        callback_closure->callback(PRIVACY_PRIVILEGE_MANAGER_CALL_CAUSE_ERROR, NULL, privileges, privileges_count, callback_closure->user_data);
         free(callback_closure);
         return;
     }
index a3b32709aa31f8ff6fa1b620289de6ae3f9613eb..c9d7525be1b521c478ded78aca4e5b2f43a48dc1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2017-2020 Samsung Electronics Co., Ltd. All rights reserved
+ *  Copyright (c) 2017-2023 Samsung Electronics Co., Ltd. All rights reserved
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
 #include <functional>
 #include <map>
 #include <set>
+#include <stdexcept>
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>