Various small fixes to 4.6.2-pre1
- From: Vladimir Nadvornik <nadvornik suse cz>
- To: mc-devel gnome org
- Subject: Various small fixes to 4.6.2-pre1
- Date: Thu, 1 Nov 2007 16:48:02 +0100
Hi,
Here are small patches that fixes various issues with 4.6.2-pre1.
mc-getpwuid.patch - prevents a crash if getpwuid returns NULL
mc-NULL.patch - fixes various compiler warnings about NULL-terminated
argument lists and format strings.
mc-syntax-hpp.patch - enables syntax hilight for hpp files
Vladimir Nadvornik
--- edit/editlock.c
+++ edit/editlock.c
@@ -69,9 +69,11 @@
lock_build_name (void)
{
char host[BUF_SIZE];
- const char *user;
+ const char *user = NULL;
+ struct passwd *pw;
- user = getpwuid (getuid ())->pw_name;
+ pw = getpwuid (getuid ());
+ if (pw) user = pw->pw_name;
if (!user) user = getenv ("USER");
if (!user) user = getenv ("USERNAME");
if (!user) user = getenv ("LOGNAME");
--- mc-4.6.2-pre1/src/cmd.c
+++ mc-4.6.2-pre1/src/cmd.c
@@ -1229,7 +1229,7 @@
sync_profiles ();
str = g_strconcat ( _(" Setup saved to ~/"), PROFILE_NAME, (char *) NULL);
- message (0, _(" Setup "), str);
+ message (0, _(" Setup "), "%s", str);
g_free (str);
}
--- mc-4.6.2-pre1/src/hotlist.c
+++ mc-4.6.2-pre1/src/hotlist.c
@@ -1475,7 +1475,7 @@
msg = g_strconcat (_("MC was unable to write ~/"), HOTLIST_FILENAME,
_(" file, your old hotlist entries were not deleted"), (char *) NULL);
- message (D_ERROR, _(" Hotlist Load "), msg);
+ message (D_ERROR, _(" Hotlist Load "), "%s", msg);
g_free (msg);
}
} else {
--- mc-4.6.2-pre1/vfs/smbfs.c
+++ mc-4.6.2-pre1/vfs/smbfs.c
@@ -566,7 +566,7 @@
if (p)
my_remote = p; /* strip off share/service name */
/* create remote filename as understood by smb clientgen */
- result = g_strconcat (my_remote, trailing_asterik ? "/*" : "", 0);
+ result = g_strconcat (my_remote, trailing_asterik ? "/*" : "", (char *) NULL);
unix_to_dos (result, /* inplace = */ 1); /* code page conversion */
str_replace(result, '/', '\\');
return result;
--- syntax/Syntax
+++ syntax/Syntax
@@ -76,7 +76,7 @@
file ..\*\.(texi|texinfo|TEXI|TEXINFO)$ Texinfo\sDocument
include texinfo.syntax
-file ..\*\\.([chC]|CC|cxx|cc|cpp|CPP|CXX|hxx|h\.in)$ C/C\+\+\sProgram
+file ..\*\\.([chC]|CC|cxx|cc|cpp|CPP|CXX|hxx|hpp|HPP|h\.in)$ C/C\+\+\sProgram
include c.syntax
file ..\*\\.d$ D\sProgram
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]