mirror of https://github.com/crash-utility/crash
Fixes for "[-Werror=misleading-indentation]" compiler warnings that
are generated by the following files, when building X86_64 in a Fedora Rawhide environment with gcc-6.0.0: gdb-7.6/bfd/coff-i386.c gdb-7.6/bfd/coff-x86_64.c kernel.c x86_64.c lkcd_common.c Without the patch, the warnings in the bfd library files are treated as errors, and abort the build. The three instances in the top-level crash source code directory are non-fatal. There are several other gdb-specific instances that are non-fatal and are not addressed. (anderson@redhat.com)
This commit is contained in:
parent
1e92f9fad3
commit
835c360273
|
@ -1876,3 +1876,25 @@
|
|||
for (i = strlen (obuf) + prefix_length; i < 6; i++)
|
||||
oappend (" ");
|
||||
oappend (" ");
|
||||
--- gdb-7.6/bfd/coff-i386.c.orig
|
||||
+++ gdb-7.6/bfd/coff-i386.c
|
||||
@@ -141,7 +141,7 @@ coff_i386_reloc (bfd *abfd,
|
||||
#define DOIT(x) \
|
||||
x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask))
|
||||
|
||||
- if (diff != 0)
|
||||
+ if (diff != 0)
|
||||
{
|
||||
reloc_howto_type *howto = reloc_entry->howto;
|
||||
unsigned char *addr = (unsigned char *) data + reloc_entry->address;
|
||||
--- gdb-7.6/bfd/coff-x86_64.c.orig
|
||||
+++ gdb-7.6/bfd/coff-x86_64.c
|
||||
@@ -139,7 +139,7 @@ coff_amd64_reloc (bfd *abfd,
|
||||
#define DOIT(x) \
|
||||
x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask))
|
||||
|
||||
- if (diff != 0)
|
||||
+ if (diff != 0)
|
||||
{
|
||||
reloc_howto_type *howto = reloc_entry->howto;
|
||||
unsigned char *addr = (unsigned char *) data + reloc_entry->address;
|
||||
|
|
4
kernel.c
4
kernel.c
|
@ -8179,7 +8179,7 @@ do_timer_list(ulong vec_kvaddr,
|
|||
int timer_cnt;
|
||||
struct list_data list_data, *ld;
|
||||
long sz;
|
||||
ulong offset;
|
||||
ulong offset = 0;
|
||||
|
||||
tdx = 0;
|
||||
td = option ? (struct timer_data *)option : NULL;
|
||||
|
@ -8208,7 +8208,7 @@ do_timer_list(ulong vec_kvaddr,
|
|||
goto new_timer_list_format;
|
||||
}
|
||||
|
||||
if (VALID_MEMBER(timer_list_next) >= 0)
|
||||
if (VALID_MEMBER(timer_list_next))
|
||||
offset = OFFSET(timer_list_next);
|
||||
else
|
||||
error(FATAL, "no timer_list next, list, or entry members?\n");
|
||||
|
|
|
@ -1240,9 +1240,10 @@ lkcd_uncompress_gzip(unsigned char *dest, ulong destlen,
|
|||
switch (uncompress(dest, &retlen, source, sourcelen))
|
||||
{
|
||||
case Z_OK:
|
||||
if (retlen == destlen)
|
||||
if (retlen == destlen) {
|
||||
rc = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
lkcd_print("uncompress: returned length not page size: %ld\n",
|
||||
retlen);
|
||||
|
|
22
x86_64.c
22
x86_64.c
|
@ -2318,19 +2318,19 @@ x86_64_eframe_search(struct bt_info *bt)
|
|||
continue;
|
||||
if (ms->stkinfo.ibase[c] == 0)
|
||||
break;
|
||||
bt->hp->esp = ms->stkinfo.ibase[c];
|
||||
fprintf(fp, "CPU %d IRQ STACK:", c);
|
||||
bt->hp->esp = ms->stkinfo.ibase[c];
|
||||
fprintf(fp, "CPU %d IRQ STACK:", c);
|
||||
|
||||
if (hide_offline_cpu(c)) {
|
||||
fprintf(fp, " [OFFLINE]\n\n");
|
||||
continue;
|
||||
} else
|
||||
fprintf(fp, "\n");
|
||||
if (hide_offline_cpu(c)) {
|
||||
fprintf(fp, " [OFFLINE]\n\n");
|
||||
continue;
|
||||
} else
|
||||
fprintf(fp, "\n");
|
||||
|
||||
if ((cnt = x86_64_eframe_search(bt)))
|
||||
fprintf(fp, "\n");
|
||||
else
|
||||
fprintf(fp, "(none found)\n\n");
|
||||
if ((cnt = x86_64_eframe_search(bt)))
|
||||
fprintf(fp, "\n");
|
||||
else
|
||||
fprintf(fp, "(none found)\n\n");
|
||||
}
|
||||
|
||||
for (c = 0; c < kt->cpus; c++) {
|
||||
|
|
Loading…
Reference in New Issue