diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig | 2 | ||||
-rw-r--r-- | lib/bzip2/bzlib_compress.c | 7 | ||||
-rw-r--r-- | lib/fdtdec.c | 11 | ||||
-rw-r--r-- | lib/gunzip.c | 3 | ||||
-rw-r--r-- | lib/zlib/inffast.c | 2 | ||||
-rw-r--r-- | lib/zlib/inftrees.c | 2 | ||||
-rw-r--r-- | lib/zlib/zutil.h | 2 |
7 files changed, 19 insertions, 10 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index 46d7034397..c7eab46516 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -16,7 +16,7 @@ config USE_PRIVATE_LIBGCC depends on HAVE_PRIVATE_LIBGCC help This option allows you to use the built-in libgcc implementation - of U-boot instead of the one privided by the compiler. + of U-Boot instead of the one privided by the compiler. If unsure, say N. config SYS_HZ diff --git a/lib/bzip2/bzlib_compress.c b/lib/bzip2/bzlib_compress.c index c8da1c72e9..68d948b427 100644 --- a/lib/bzip2/bzlib_compress.c +++ b/lib/bzip2/bzlib_compress.c @@ -67,7 +67,7 @@ */ #include "bzlib_private.h" - +#include <compiler.h> /*---------------------------------------------------*/ /*--- Bit stream I/O ---*/ @@ -280,7 +280,8 @@ void sendMTFValues ( EState* s ) { Int32 v, t, i, j, gs, ge, totc, bt, bc, iter; Int32 nSelectors, alphaSize, minLen, maxLen, selCtr; - Int32 nGroups, nBytes; + Int32 nGroups; + Int32 nBytes __maybe_unused; /*-- UChar len [BZ_N_GROUPS][BZ_MAX_ALPHA_SIZE]; @@ -635,8 +636,6 @@ void sendMTFValues ( EState* s ) if (s->verbosity >= 3) VPrintf1( "codes %d\n", s->numZ-nBytes ); - else /* squash compiler 'used but not set' warning */ - nBytes = nBytes; } diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 0eb56af4d6..1b1ca02e69 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -831,6 +831,17 @@ int fdtdec_parse_phandle_with_args(const void *blob, int src_node, return rc; } +int fdtdec_get_child_count(const void *blob, int node) +{ + int subnode; + int num = 0; + + fdt_for_each_subnode(blob, subnode, node) + num++; + + return num; +} + int fdtdec_get_byte_array(const void *blob, int node, const char *prop_name, u8 *array, int count) { diff --git a/lib/gunzip.c b/lib/gunzip.c index 80b157f99e..da0c76c500 100644 --- a/lib/gunzip.c +++ b/lib/gunzip.c @@ -286,12 +286,11 @@ int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp, do { r = inflate(&s, Z_FINISH); if (stoponerr == 1 && r != Z_STREAM_END && - (s.avail_out == 0 || r != Z_BUF_ERROR)) { + (s.avail_in == 0 || s.avail_out == 0 || r != Z_BUF_ERROR)) { printf("Error: inflate() returned %d\n", r); err = -1; break; } - s.avail_in = *lenp - offset - (int)(s.next_out - (unsigned char*)dst); } while (r == Z_BUF_ERROR); *lenp = s.next_out - (unsigned char *) dst; inflateEnd(&s); diff --git a/lib/zlib/inffast.c b/lib/zlib/inffast.c index 0700e04cb9..e3c7f3b892 100644 --- a/lib/zlib/inffast.c +++ b/lib/zlib/inffast.c @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* U-boot: we already included these +/* U-Boot: we already included these #include "zutil.h" #include "inftrees.h" #include "inflate.h" diff --git a/lib/zlib/inftrees.c b/lib/zlib/inftrees.c index 7474a52e7f..b71b9695a8 100644 --- a/lib/zlib/inftrees.c +++ b/lib/zlib/inftrees.c @@ -3,7 +3,7 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* U-boot: we already included these +/* U-Boot: we already included these #include "zutil.h" #include "inftrees.h" */ diff --git a/lib/zlib/zutil.h b/lib/zlib/zutil.h index 7e05c3b564..e63bf68653 100644 --- a/lib/zlib/zutil.h +++ b/lib/zlib/zutil.h @@ -95,7 +95,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ /* Diagnostic functions */ #ifdef DEBUG -/* Not valid for U-boot +/* Not valid for U-Boot # include <stdio.h> */ extern int z_verbose; extern void z_error OF((char *m)); |