This adds the following commits from upstream: abbd523bae6e pylibfdt: Work-around SWIG limitations with flexible arrays a41509bea3e7 libfdt: Replace deprecated 0-length arrays with proper flexible arrays 2cd89f862cdb dtc: Warning rather than error on possible truncation of cell values
Unified · Split
| @@ -404,9 +404,14 @@ arrayprefix: · 403 unmodified lines | |||
| 404 | * within the mask to one (i.e. | in the | 404 | * within the mask to one (i.e. | in the |
| 405 | * mask), all bits are one. | 405 | * mask), all bits are one. |
| 406 | */ | 406 | */ |
| 407 | if (($2 > mask) && (($2 | mask) != -1ULL)) | 407 | if (($2 > mask) && (($2 | mask) != -1ULL)) { |
| 408 | ERROR(&@2, "Value out of range for" | 408 | char *loc = srcpos_string(&@2); |
| 409 | " %d-bit array element", $1.bits); | 409 | fprintf(stderr, |
| 410 | "WARNING: %s: Value 0x%016" PRIx64 | ||
| 411 | " truncated to 0x%0*" PRIx64 "\n", | ||
| 412 | loc, $2, $1.bits / 4, ($2 & mask)); | ||
| 413 | free(loc); | ||
| 414 | } | ||
| 410 | } | 415 | } |
| 411 | 416 | ||
| 412 | $$.data = data_append_integer($1.data, $2, $1.bits); | 417 | $$.data = data_append_integer($1.data, $2, $1.bits); |
| @@ -35,14 +35,14 @@ struct fdt_reserve_entry { · 34 unmodified lines | |||
| 35 | 35 | ||
| 36 | struct fdt_node_header { | 36 | struct fdt_node_header { |
| 37 | fdt32_t tag; | 37 | fdt32_t tag; |
| 38 | char name[0]; | 38 | char name[]; |
| 39 | }; | 39 | }; |
| 40 | 40 | ||
| 41 | struct fdt_property { | 41 | struct fdt_property { |
| 42 | fdt32_t tag; | 42 | fdt32_t tag; |
| 43 | fdt32_t len; | 43 | fdt32_t len; |
| 44 | fdt32_t nameoff; | 44 | fdt32_t nameoff; |
| 45 | char data[0]; | 45 | char data[]; |
| 46 | }; | 46 | }; |
| 47 | 47 | ||
| 48 | #endif /* !__ASSEMBLY */ | 48 | #endif /* !__ASSEMBLY */ |
| @@ -1 +1 @@ | |||
| 1 | #define DTC_VERSION "DTC 1.6.1-g55778a03" | 1 | #define DTC_VERSION "DTC 1.6.1-gabbd523b" |