[gnome-commander] fix compiler warning: conversion from NULL
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] fix compiler warning: conversion from NULL
- Date: Thu, 22 Jan 2015 21:42:49 +0000 (UTC)
commit b86e5ff15ad33a892af977655b79f7118e2a3dc2
Author: Markus Rathgeb <maggu2810 gmail com>
Date: Tue Jan 20 15:12:16 2015 +0100
fix compiler warning: conversion from NULL
- gnome-cmd-file-list.cc:185:56: warning: passing NULL to non-pointer
argument 2 of ‘void* memset(void*, int, size_t)’ [-Wconversion-null]
- gnome-cmd-file-list.cc:186:54: warning: passing NULL to non-pointer
argument 2 of ‘void* memset(void*, int, size_t)’ [-Wconversion-null]
- gnome-cmd-file.cc:612:5: warning: converting to non-pointer type
‘gboolean {aka int}’ from NULL [-Wconversion-null]
Signed-off-by: Markus Rathgeb <maggu2810 gmail com>
Signed-off-by: Uwe Scholz <uwescholz src gnome org>
src/gnome-cmd-file-list.cc | 4 ++--
src/gnome-cmd-file.cc | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/gnome-cmd-file-list.cc b/src/gnome-cmd-file-list.cc
index 111bb40..c8de624 100644
--- a/src/gnome-cmd-file-list.cc
+++ b/src/gnome-cmd-file-list.cc
@@ -184,8 +184,8 @@ struct GnomeCmdFileList::Private
GnomeCmdFileList::Private::Private(GnomeCmdFileList *fl)
{
- memset(column_pixmaps, NULL, sizeof(column_pixmaps));
- memset(column_labels, NULL, sizeof(column_labels));
+ memset(column_pixmaps, 0, sizeof(column_pixmaps));
+ memset(column_labels, 0, sizeof(column_labels));
base_dir = NULL;
diff --git a/src/gnome-cmd-file.cc b/src/gnome-cmd-file.cc
index 4c94c35..c74e544 100644
--- a/src/gnome-cmd-file.cc
+++ b/src/gnome-cmd-file.cc
@@ -609,7 +609,7 @@ const gchar *GnomeCmdFile::get_type_desc()
gboolean GnomeCmdFile::get_type_pixmap_and_mask(GdkPixmap **pixmap, GdkBitmap **mask)
{
- g_return_val_if_fail (info != NULL, NULL);
+ g_return_val_if_fail (info != NULL, FALSE);
return IMAGE_get_pixmap_and_mask (info->type, info->mime_type, info->symlink_name != NULL, pixmap, mask);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]