Fix clang warning string-plus-int
Clang message: error: adding 'size_t' (aka 'unsigned long') to a string does not append to the string Change-Id: Ice854f584e92917aca6821d5ec2352fc4e38f2f0 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2395 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
@@ -193,9 +193,9 @@ PackageSettings::Load(dev_t mountPointDeviceID, ino_t mountPointNodeID,
|
|||||||
|
|
||||||
// get the mount point relative settings file path
|
// get the mount point relative settings file path
|
||||||
const char* settingsFilePath = mountType == PACKAGE_FS_MOUNT_TYPE_HOME
|
const char* settingsFilePath = mountType == PACKAGE_FS_MOUNT_TYPE_HOME
|
||||||
? kUserSettingsGlobalDirectory "/packages"
|
? &(kUserSettingsGlobalDirectory "/packages")
|
||||||
+ strlen(kUserConfigDirectory) + 1
|
[strlen(kUserConfigDirectory) + 1]
|
||||||
: kSystemSettingsDirectory "/packages" + strlen(kSystemDirectory) + 1;
|
: &(kSystemSettingsDirectory "/packages")[strlen(kSystemDirectory) + 1];
|
||||||
|
|
||||||
// get an absolute path
|
// get an absolute path
|
||||||
KPath path;
|
KPath path;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ PackageSettingsItem::Load(::Directory* systemDirectory, const char* name)
|
|||||||
{
|
{
|
||||||
// open the driver settings file
|
// open the driver settings file
|
||||||
const char* settingsFilePath
|
const char* settingsFilePath
|
||||||
= kSystemSettingsDirectory "/packages" + strlen(kSystemDirectory) + 1;
|
= &(kSystemSettingsDirectory "/packages")[strlen(kSystemDirectory) + 1];
|
||||||
|
|
||||||
int fd = open_from(systemDirectory, settingsFilePath, B_READ_ONLY, 0);
|
int fd = open_from(systemDirectory, settingsFilePath, B_READ_ONLY, 0);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user