[brasero] Fix a couple of warnings
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Fix a couple of warnings
- Date: Wed, 9 Sep 2009 20:20:56 +0000 (UTC)
commit 2649b0af8a49d2c2c5fe877fff3928dad2a18b40
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Wed Sep 9 16:29:12 2009 +0200
Fix a couple of warnings
libbrasero-burn/brasero-burn.c | 2 +-
libbrasero-burn/brasero-session.c | 3 ++-
libbrasero-burn/brasero-xfer.c | 2 +-
libbrasero-burn/burn-image-format.c | 8 +++++---
plugins/checksum/burn-checksum-files.c | 2 +-
src/baobab-cell-renderer-progress.c | 2 +-
src/brasero-app.c | 2 ++
7 files changed, 13 insertions(+), 8 deletions(-)
---
diff --git a/libbrasero-burn/brasero-burn.c b/libbrasero-burn/brasero-burn.c
index 2c2af99..f1d7cf8 100644
--- a/libbrasero-burn/brasero-burn.c
+++ b/libbrasero-burn/brasero-burn.c
@@ -2189,6 +2189,7 @@ brasero_burn_record_session (BraseroBurn *burn,
gboolean erase_allowed,
GError **error)
{
+ gboolean dummy_session = FALSE;
const gchar *checksum = NULL;
BraseroTrack *track = NULL;
BraseroChecksumType type;
@@ -2196,7 +2197,6 @@ brasero_burn_record_session (BraseroBurn *burn,
BraseroBurnResult result;
GError *ret_error = NULL;
BraseroMedium *medium;
- gboolean dummy_session;
GSList *tracks;
priv = BRASERO_BURN_PRIVATE (burn);
diff --git a/libbrasero-burn/brasero-session.c b/libbrasero-burn/brasero-session.c
index 1d0f6f9..9d3e0c0 100644
--- a/libbrasero-burn/brasero-session.c
+++ b/libbrasero-burn/brasero-session.c
@@ -2052,7 +2052,8 @@ brasero_burn_session_logv (BraseroBurnSession *self,
g_free (message);
- fwrite ("\n", 1, 1, priv->session);
+ if (fwrite ("\n", 1, 1, priv->session) != 1)
+ g_warning ("Some log data could not be written");
}
void
diff --git a/libbrasero-burn/brasero-xfer.c b/libbrasero-burn/brasero-xfer.c
index e37e2bd..be44957 100644
--- a/libbrasero-burn/brasero-xfer.c
+++ b/libbrasero-burn/brasero-xfer.c
@@ -93,8 +93,8 @@ brasero_xfer_recursive_transfer (BraseroXferCtx *ctx,
GCancellable *cancel,
GError **error)
{
- gboolean result;
GFileInfo *info;
+ gboolean result = TRUE;
GFileEnumerator *enumerator;
BRASERO_BURN_LOG ("Downloading directory contents");
diff --git a/libbrasero-burn/burn-image-format.c b/libbrasero-burn/burn-image-format.c
index aa44191..13fd697 100644
--- a/libbrasero-burn/burn-image-format.c
+++ b/libbrasero-burn/burn-image-format.c
@@ -337,7 +337,7 @@ brasero_image_format_get_FILE_info (const gchar *ptr,
gchar *path = NULL;
gint64 start = 0;
GFileInfo *info;
- GFile *file;
+ GFile *file = NULL;
gchar *tmp;
/* get the path and skip it */
@@ -396,6 +396,8 @@ stat_end:
file = g_file_new_for_commandline_arg (img_uri);
g_free (img_uri);
}
+ else
+ return FALSE;
g_free (path);
@@ -547,12 +549,12 @@ brasero_image_format_get_cue_size (gchar *uri,
if ((ptr = strstr (line, "FILE"))) {
GFileInfo *info;
- GFile *file_img;
gchar *file_path;
+ GFile *file_img = NULL;
ptr += 4;
- /* get the path */
+ /* get the path (NOTE: if ptr is NULL file_path as well) */
ptr = brasero_image_format_read_path (ptr, &file_path);
if (!ptr) {
g_object_unref (stream);
diff --git a/plugins/checksum/burn-checksum-files.c b/plugins/checksum/burn-checksum-files.c
index 58e3933..c793986 100644
--- a/plugins/checksum/burn-checksum-files.c
+++ b/plugins/checksum/burn-checksum-files.c
@@ -814,11 +814,11 @@ brasero_checksum_files_check_files (BraseroChecksumFiles *self,
BraseroVolFile *file;
BraseroDrive *drive;
BraseroMedium *medium;
- BraseroVolFileHandle *handle;
GChecksumType gchecksum_type;
GArray *wrong_checksums = NULL;
BraseroDeviceHandle *dev_handle;
BraseroChecksumFilesPrivate *priv;
+ BraseroVolFileHandle *handle = NULL;
BraseroBurnResult result = BRASERO_BURN_OK;
priv = BRASERO_CHECKSUM_FILES_PRIVATE (self);
diff --git a/src/baobab-cell-renderer-progress.c b/src/baobab-cell-renderer-progress.c
index 69c4cca..96dbb44 100644
--- a/src/baobab-cell-renderer-progress.c
+++ b/src/baobab-cell-renderer-progress.c
@@ -187,7 +187,7 @@ baobab_cell_renderer_progress_render (GtkCellRenderer *cell,
guint flags)
{
BaobabCellRendererProgress *cellprogress = BAOBAB_CELL_RENDERER_PROGRESS (cell);
- gint x, y, w, h, perc_w, pos;
+ gint x, y, w, h, perc_w;
gboolean is_rtl;
cairo_t *cr;
diff --git a/src/brasero-app.c b/src/brasero-app.c
index 78452c7..fb1abb4 100644
--- a/src/brasero-app.c
+++ b/src/brasero-app.c
@@ -1302,6 +1302,8 @@ brasero_app_open_uri (BraseroApp *app,
type = BRASERO_PROJECT_TYPE_INVALID;
}
+ else
+ type = BRASERO_PROJECT_TYPE_INVALID;
g_free (uri);
g_object_unref (file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]