mirror of
https://github.com/swaywm/sway.git
synced 2024-11-10 12:33:50 +01:00
Fix warnings introduced by prior commit
This commit is contained in:
parent
8e25ce4e57
commit
318e1be240
@ -2,6 +2,11 @@
|
||||
#define _SWAY_STRINGOP_H
|
||||
#include "list.h"
|
||||
|
||||
#if !HAVE_DECL_SETENV
|
||||
// Not sure why we need to provide this
|
||||
extern int setenv(const char *, const char *, int);
|
||||
#endif
|
||||
|
||||
// array of whitespace characters to use for delims
|
||||
extern const char *whitespace;
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <unistd.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -1,7 +1,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <strings.h>
|
||||
#include <string.h>
|
||||
#include "config.h"
|
||||
#include "stringop.h"
|
||||
#include "container.h"
|
||||
#include "workspace.h"
|
||||
#include "focus.h"
|
||||
|
@ -80,9 +80,7 @@ void sway_log_errno(log_importance_t verbosity, char* format, ...) {
|
||||
va_end(args);
|
||||
|
||||
fprintf(stderr, ": ");
|
||||
char error[256];
|
||||
strerror_r(errno, error, sizeof(error));
|
||||
fprintf(stderr, "%s", error);
|
||||
fprintf(stderr, "%s", strerror(errno));
|
||||
|
||||
if (colored && isatty(STDERR_FILENO)) {
|
||||
fprintf(stderr, "\x1B[0m");
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include <signal.h>
|
||||
#include <getopt.h>
|
||||
#include "layout.h"
|
||||
#include "stringop.h"
|
||||
#include "config.h"
|
||||
#include "log.h"
|
||||
#include "readline.h"
|
||||
|
@ -311,3 +311,11 @@ char *join_list(list_t *list, char *separator) {
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
char *strdup(const char *str) {
|
||||
char *dup = malloc(strlen(str) + 1);
|
||||
if (dup) {
|
||||
strcpy(dup, str);
|
||||
}
|
||||
return dup;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <wlc/wlc.h>
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include "workspace.h"
|
||||
#include "layout.h"
|
||||
#include "list.h"
|
||||
|
Loading…
Reference in New Issue
Block a user