enable -Werror by default globally
. and fix a few remaining warnings Change-Id: I36af7f1499ba1ee23a6cc47b5bd3dc0ac369b088
This commit is contained in:
parent
3161c603a6
commit
27986e127d
|
|
@ -85,12 +85,6 @@ LDS_RELOC= ${LDS_PATH}/elf_${MACHINE_ARCH}_minix.xr
|
||||||
LDS_SHARED_LIB= ${LDS_PATH}/elf_${MACHINE_ARCH}_minix.xsc
|
LDS_SHARED_LIB= ${LDS_PATH}/elf_${MACHINE_ARCH}_minix.xsc
|
||||||
LDS_N= ${LDS_PATH}/elf_${MACHINE_ARCH}_minix.xbn
|
LDS_N= ${LDS_PATH}/elf_${MACHINE_ARCH}_minix.xbn
|
||||||
|
|
||||||
# LSC In the current state there is too much to be done
|
|
||||||
# Some package have been identified by directly adding NOGCCERROR
|
|
||||||
# To their Makefiles
|
|
||||||
NOGCCERROR?= yes
|
|
||||||
NOCLANGERROR?= yes
|
|
||||||
|
|
||||||
AFLAGS+= -D__ASSEMBLY__
|
AFLAGS+= -D__ASSEMBLY__
|
||||||
CFLAGS+= -fno-builtin
|
CFLAGS+= -fno-builtin
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -230,12 +230,12 @@ static int print_memory(void)
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
unsigned int pagesize;
|
unsigned int pagesize;
|
||||||
unsigned long total, free, largest, cached;
|
unsigned long total, freemem, largest, cached;
|
||||||
|
|
||||||
if ((fp = fopen("meminfo", "r")) == NULL)
|
if ((fp = fopen("meminfo", "r")) == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (fscanf(fp, "%u %lu %lu %lu %lu", &pagesize, &total, &free,
|
if (fscanf(fp, "%u %lu %lu %lu %lu", &pagesize, &total, &freemem,
|
||||||
&largest, &cached) != 5) {
|
&largest, &cached) != 5) {
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -245,7 +245,7 @@ static int print_memory(void)
|
||||||
|
|
||||||
printf("main memory: %ldK total, %ldK free, %ldK contig free, "
|
printf("main memory: %ldK total, %ldK free, %ldK contig free, "
|
||||||
"%ldK cached\n",
|
"%ldK cached\n",
|
||||||
(pagesize * total)/1024, (pagesize * free)/1024,
|
(pagesize * total)/1024, (pagesize * freemem)/1024,
|
||||||
(pagesize * largest)/1024, (pagesize * cached)/1024);
|
(pagesize * largest)/1024, (pagesize * cached)/1024);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
@ -290,7 +290,8 @@ struct tp {
|
||||||
|
|
||||||
static int cmp_procs(const void *v1, const void *v2)
|
static int cmp_procs(const void *v1, const void *v2)
|
||||||
{
|
{
|
||||||
struct tp *p1 = (struct tp *) v1, *p2 = (struct tp *) v2;
|
struct tp *p1 = (struct tp *) __UNCONST(v1),
|
||||||
|
*p2 = (struct tp *) __UNCONST(v2);
|
||||||
int p1blocked, p2blocked;
|
int p1blocked, p2blocked;
|
||||||
|
|
||||||
if(order == ORDER_MEMORY) {
|
if(order == ORDER_MEMORY) {
|
||||||
|
|
|
||||||
|
|
@ -290,18 +290,18 @@ static char * parse_mode(int mode){
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
dump_entry(FILE * out, int index, const char *base_dir)
|
dump_entry(FILE * out, int mindex, const char *base_dir)
|
||||||
{
|
{
|
||||||
|
|
||||||
int space;
|
int space;
|
||||||
int i;
|
int i;
|
||||||
struct entry *entry = &entries[index];
|
struct entry *entry = &entries[mindex];
|
||||||
|
|
||||||
if (entry->type == ENTRY_DIR) {
|
if (entry->type == ENTRY_DIR) {
|
||||||
for (space = 0; space < entries[index].depth; space++) {
|
for (space = 0; space < entries[mindex].depth; space++) {
|
||||||
fprintf(out, " ");
|
fprintf(out, " ");
|
||||||
}
|
}
|
||||||
if (entries[index].depth > 0) {
|
if (entries[mindex].depth > 0) {
|
||||||
fprintf(out, "%s ", entry->filename);
|
fprintf(out, "%s ", entry->filename);
|
||||||
}
|
}
|
||||||
fprintf(out, "d%s", parse_mode(entry->mode));
|
fprintf(out, "d%s", parse_mode(entry->mode));
|
||||||
|
|
@ -313,12 +313,12 @@ dump_entry(FILE * out, int index, const char *base_dir)
|
||||||
dump_entry(out, i, base_dir);
|
dump_entry(out, i, base_dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (space = 0; space < entries[index].depth; space++) {
|
for (space = 0; space < entries[mindex].depth; space++) {
|
||||||
fprintf(out, " ");
|
fprintf(out, " ");
|
||||||
}
|
}
|
||||||
fprintf(out, "$\n");
|
fprintf(out, "$\n");
|
||||||
} else if (entry->type == ENTRY_FILE) {
|
} else if (entry->type == ENTRY_FILE) {
|
||||||
for (space = 0; space < entries[index].depth; space++) {
|
for (space = 0; space < entries[mindex].depth; space++) {
|
||||||
fprintf(out, " ");
|
fprintf(out, " ");
|
||||||
}
|
}
|
||||||
/* hack skipping the first . in the path */
|
/* hack skipping the first . in the path */
|
||||||
|
|
@ -326,7 +326,7 @@ dump_entry(FILE * out, int index, const char *base_dir)
|
||||||
parse_mode(entry->mode), entry->uid, entry->gid, base_dir,
|
parse_mode(entry->mode), entry->uid, entry->gid, base_dir,
|
||||||
&entry->path[1]);
|
&entry->path[1]);
|
||||||
} else if (entry->type == ENTRY_LINK) {
|
} else if (entry->type == ENTRY_LINK) {
|
||||||
for (space = 0; space < entries[index].depth; space++) {
|
for (space = 0; space < entries[mindex].depth; space++) {
|
||||||
fprintf(out, " ");
|
fprintf(out, " ");
|
||||||
}
|
}
|
||||||
/* hack skipping the first . in the path */
|
/* hack skipping the first . in the path */
|
||||||
|
|
@ -335,7 +335,7 @@ dump_entry(FILE * out, int index, const char *base_dir)
|
||||||
} else {
|
} else {
|
||||||
/* missing "b" and "c" for block and char device? */
|
/* missing "b" and "c" for block and char device? */
|
||||||
fprintf(out, "# ");
|
fprintf(out, "# ");
|
||||||
for (space = 1; space < entries[index].depth; space++) {
|
for (space = 1; space < entries[mindex].depth; space++) {
|
||||||
fprintf(out, " ");
|
fprintf(out, " ");
|
||||||
}
|
}
|
||||||
fprintf(out, "%i %s\n", entry->type, entry->path);
|
fprintf(out, "%i %s\n", entry->type, entry->path);
|
||||||
|
|
@ -360,7 +360,7 @@ dump_proto(FILE * out, const char *base_dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_usage()
|
print_usage(void)
|
||||||
{
|
{
|
||||||
printf("Usage: toproto [OPTION]...\n");
|
printf("Usage: toproto [OPTION]...\n");
|
||||||
printf
|
printf
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user