diff --git a/bfd/tekhex.c b/bfd/tekhex.c index 7e4e698efd6..4ac61166d0e 100644 --- a/bfd/tekhex.c +++ b/bfd/tekhex.c @@ -655,7 +655,7 @@ move_section_contents (bfd *abfd, { /* Different chunk, so move pointer. */ d = find_chunk (abfd, chunk_number, must_write); - if (!d) + if (!d && must_write) return false; prev_number = chunk_number; } diff --git a/gdb/testsuite/gdb.base/dump.c b/gdb/testsuite/gdb.base/dump.c index bdcafbffe0e..14b66b15643 100644 --- a/gdb/testsuite/gdb.base/dump.c +++ b/gdb/testsuite/gdb.base/dump.c @@ -35,7 +35,7 @@ main() for (i = 0; i < ARRSIZE; i++) intarray[i] = i+1; - intstruct.a = 12 * 1; + intstruct.a = (12 * 1) << 16; intstruct.b = 12 * 2; intstruct.c = 12 * 3; intstruct.d = 12 * 4;