mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-20 05:28:17 +07:00
udev: fix gcc warnings
This commit is contained in:
parent
6df831f25e
commit
4b0060e68b
@ -119,7 +119,7 @@ static int skip_to(FILE *file, long offset)
|
||||
old_offset = ftell(file);
|
||||
if (offset > old_offset && offset - old_offset <= BUFSIZ) {
|
||||
size_t skip_bytes = offset - old_offset;
|
||||
char buf[skip_bytes];
|
||||
char *buf = alloca(skip_bytes);
|
||||
|
||||
if (fread(buf, skip_bytes, 1, file) != skip_bytes)
|
||||
return -1;
|
||||
|
@ -78,7 +78,7 @@ static void set_type(const char *from, char *to, size_t len)
|
||||
{
|
||||
int type_num;
|
||||
char *eptr;
|
||||
char *type = "generic";
|
||||
const char *type = "generic";
|
||||
|
||||
type_num = strtoul(from, &eptr, 0);
|
||||
if (eptr != from) {
|
||||
@ -122,10 +122,10 @@ static void set_type(const char *from, char *to, size_t len)
|
||||
*/
|
||||
static char *get_value(char **buffer)
|
||||
{
|
||||
static char *quote_string = "\"\n";
|
||||
static char *comma_string = ",\n";
|
||||
static const char *quote_string = "\"\n";
|
||||
static const char *comma_string = ",\n";
|
||||
char *val;
|
||||
char *end;
|
||||
const char *end;
|
||||
|
||||
if (**buffer == '"') {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user