Silence SVACE warning 33/315433/7
authorTomasz Swierczek <t.swierczek@samsung.com>
Tue, 19 Nov 2024 09:51:05 +0000 (10:51 +0100)
committerTomasz Swierczek <t.swierczek@samsung.com>
Fri, 13 Dec 2024 08:05:18 +0000 (09:05 +0100)
Change-Id: Ib9baacdbdd47f197b39c530a2b5bff75e0fc944e

src/nss/nss_securitymanager.cpp

index eec7fe43c763b608a56d83885a96138002e3a183..f420b8e10d8095f8018fce46325db20e0d9fd149 100644 (file)
@@ -116,7 +116,7 @@ enum nss_status _nss_securitymanager_initgroups_dyn(const char */*user*/, gid_t
         if (((*size) - (*start)) < static_cast<long int>(groupsCount)) {
             long int required = (*start) + groupsCount;
             // value bigger is the lowest power of 2 that is bigger than required value
-            long int bigger = 1 << ((sizeof(unsigned long) << 3) - __builtin_clzl(static_cast<unsigned long>(required)));
+            long int bigger = (long int)1 << ((sizeof(unsigned long) << 3) - __builtin_clzl(static_cast<unsigned long>(required)));
 
             gid_t *ptr = static_cast<gid_t*>(realloc(*groupsp, sizeof(gid_t) * (bigger)));
             if (!ptr) {