diff options
author | David King <amigadave@amigadave.com> | 2015-01-29 12:31:01 +0000 |
---|---|---|
committer | David King <amigadave@amigadave.com> | 2015-02-16 21:37:33 +0000 |
commit | d09497d7132028bcd68fc56957e12d2ff3490f20 (patch) | |
tree | ca318a5aea45400a9911cff4a95f92acfd0c717f | |
parent | 66dbb3222e63d7e6b368bb02f6a6bdaf862032ea (diff) |
Fix const cast warnings
-rw-r--r-- | libcheese/cheese-fileutil.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libcheese/cheese-fileutil.c b/libcheese/cheese-fileutil.c index c7d06122..d2d16585 100644 --- a/libcheese/cheese-fileutil.c +++ b/libcheese/cheese-fileutil.c @@ -163,7 +163,10 @@ cheese_fileutil_get_new_media_filename (CheeseFileUtil *fileutil, CheeseMediaMod case CHEESE_MEDIA_MODE_BURST: priv->burst_count++; if (strlen (priv->burst_raw_name) == 0) + { + g_free (priv->burst_raw_name); priv->burst_raw_name = g_strdup_printf ("%s%s%s", path, G_DIR_SEPARATOR_S, time_string); + } filename = g_strdup_printf ("%s_%d%s", priv->burst_raw_name, priv->burst_count, CHEESE_PHOTO_NAME_SUFFIX); break; @@ -226,7 +229,8 @@ cheese_fileutil_reset_burst (CheeseFileUtil *fileutil) priv = cheese_fileutil_get_instance_private (fileutil); priv->burst_count = 0; - priv->burst_raw_name = ""; + g_free (priv->burst_raw_name); + priv->burst_raw_name = g_strdup (""); } static void @@ -237,6 +241,7 @@ cheese_fileutil_finalize (GObject *object) g_free (priv->video_path); g_free (priv->photo_path); + g_free (priv->burst_raw_name); G_OBJECT_CLASS (cheese_fileutil_parent_class)->finalize (object); } @@ -256,7 +261,7 @@ cheese_fileutil_init (CheeseFileUtil *fileutil) GSettings *settings; priv->burst_count = 0; - priv->burst_raw_name = ""; + priv->burst_raw_name = g_strdup (""); settings = g_settings_new ("org.gnome.Cheese"); |