From 6ae16b87d0560ac06e882da122f43b0e9b913b34 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 18 Nov 2017 19:57:50 +0100 Subject: Constify strings in pref.h Make all char * pointers in pref.h const to make it clear that these strings are not mutable. This meant adding a number of (void *) casts in calls to free(). Apart from being the right thing to do, this commit makes the code more consistent, as many of the strings in pref.h were already const. While touching core/qthelper.cpp turn three instances of (void*) into (void *). Signed-off-by: Berthold Stoeger --- core/cloudstorage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/cloudstorage.cpp') diff --git a/core/cloudstorage.cpp b/core/cloudstorage.cpp index 5a1f2b06a..11743303c 100644 --- a/core/cloudstorage.cpp +++ b/core/cloudstorage.cpp @@ -64,7 +64,7 @@ void CloudStorageAuthenticate::uploadFinished() csSettings.setVerificationStatus(CS_NEED_TO_VERIFY); report_error(qPrintable(tr("Cloud account verification required, enter PIN in preferences"))); } else if (cloudAuthReply == QLatin1String("[PASSWDCHANGED]")) { - free(prefs.cloud_storage_password); + free((void *)prefs.cloud_storage_password); prefs.cloud_storage_password = prefs.cloud_storage_newpassword; prefs.cloud_storage_newpassword = NULL; emit passwordChangeSuccessful(); -- cgit v1.2.3-70-g09d2