projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Silence warning formating pid_t as int
[lttng-tools.git]
/
src
/
common
/
utils.c
diff --git
a/src/common/utils.c
b/src/common/utils.c
index 52fb25dbe7202a3af44d1548ea1b021b2ad7ee65..11018739be9ad9c7e6a83340a2434fdc2fc654c1 100644
(file)
--- a/
src/common/utils.c
+++ b/
src/common/utils.c
@@
-17,7
+17,6
@@
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#define _GNU_SOURCE
#define _LGPL_SOURCE
#include <assert.h>
#include <ctype.h>
#define _LGPL_SOURCE
#include <assert.h>
#include <ctype.h>
@@
-31,12
+30,12
@@
#include <grp.h>
#include <pwd.h>
#include <sys/file.h>
#include <grp.h>
#include <pwd.h>
#include <sys/file.h>
-#include <dirent.h>
#include <common/common.h>
#include <common/runas.h>
#include <common/compat/getenv.h>
#include <common/compat/string.h>
#include <common/common.h>
#include <common/runas.h>
#include <common/compat/getenv.h>
#include <common/compat/string.h>
+#include <common/compat/dirent.h>
#include "utils.h"
#include "defaults.h"
#include "utils.h"
#include "defaults.h"
@@
-480,7
+479,7
@@
int utils_create_pid_file(pid_t pid, const char *filepath)
goto error;
}
goto error;
}
- ret = fprintf(fp, "%d\n", pid);
+ ret = fprintf(fp, "%d\n",
(int)
pid);
if (ret < 0) {
PERROR("fprintf pid file");
goto error;
if (ret < 0) {
PERROR("fprintf pid file");
goto error;
@@
-489,7
+488,7
@@
int utils_create_pid_file(pid_t pid, const char *filepath)
if (fclose(fp)) {
PERROR("fclose");
}
if (fclose(fp)) {
PERROR("fclose");
}
- DBG("Pid %d written in file %s", pid, filepath);
+ DBG("Pid %d written in file %s",
(int)
pid, filepath);
ret = 0;
error:
return ret;
ret = 0;
error:
return ret;
@@
-1213,9
+1212,9
@@
int utils_recursive_rmdir(const char *path)
PERROR("Cannot open '%s' path", path);
return -1;
}
PERROR("Cannot open '%s' path", path);
return -1;
}
- dir_fd = dirfd(dir);
+ dir_fd =
lttng_
dirfd(dir);
if (dir_fd < 0) {
if (dir_fd < 0) {
- PERROR("dirfd");
+ PERROR("
lttng_
dirfd");
return -1;
}
return -1;
}
This page took
0.023384 seconds
and
4
git commands to generate.