[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Compiler warnings in 23.0.92 with gcc 4.3.3
From: |
Ulrich Mueller |
Subject: |
Compiler warnings in 23.0.92 with gcc 4.3.3 |
Date: |
Thu, 2 Apr 2009 12:38:28 +0200 |
With gcc 4.3.3, I get the following compiler warnings in sysdep.c:
sysdep.c: In function 'procfs_ttyname':
sysdep.c:3322: warning: format '%lu' expects type 'long unsigned int', but
argument 3 has type 'unsigned int'
sysdep.c: In function 'system_process_attributes':
sysdep.c:3393: warning: format '%lu' expects type 'long unsigned int', but
argument 3 has type 'int'
And several others (all over the place) about unused return values of
functions.
Ulrich
2009-04-02 Ulrich Mueller <address@hidden>
* sysdep.c (procfs_ttyname, system_process_attributes): Fix format
specifiers in sprintf.
--- emacs/src/sysdep.c~
+++ emacs/src/sysdep.c
@@ -3319,7 +3319,7 @@
if (MINOR (rdev) >= minor_beg && MINOR (rdev) <= minor_end)
{
- sprintf (name + strlen (name), "%lu", MINOR (rdev));
+ sprintf (name + strlen (name), "%u", MINOR (rdev));
break;
}
}
@@ -3390,7 +3390,7 @@
CHECK_NUMBER_OR_FLOAT (pid);
proc_id = FLOATP (pid) ? XFLOAT_DATA (pid) : XINT (pid);
- sprintf (procfn, "/proc/%lu", proc_id);
+ sprintf (procfn, "/proc/%u", proc_id);
if (stat (procfn, &st) < 0)
return attrs;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Compiler warnings in 23.0.92 with gcc 4.3.3,
Ulrich Mueller <=