[dev/lib][warnings] fix -Wmissing-declarations warnings in dev/ and lib/

This commit is contained in:
Travis Geiselbrecht
2021-10-21 23:16:20 -07:00
parent a895bcece5
commit fcb65c9a88
28 changed files with 49 additions and 24 deletions

View File

@@ -7,6 +7,8 @@
#include "zutil.h"
#include <lib/cksum.h>
local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
#define BASE 65521 /* largest prime smaller than 65536 */

View File

@@ -1,3 +1,4 @@
#include <lib/cksum.h>
/*
* Computes the CRC for transmitted and received data using
* the CCITT 16bit algorithm (X^16 + X^12 + X^5 + 1) with

View File

@@ -30,7 +30,7 @@
#include "zutil.h" /* for STDC and FAR definitions */
#define local static
#include <lib/cksum.h>
/* Definitions for doing the crc four data bytes at a time. */
#if !defined(NOBYFOUR) && defined(Z_U4)
@@ -188,7 +188,7 @@ local void write_table(out, table)
/* =========================================================================
* This function can be used by asm versions of crc32()
*/
const z_crc_t FAR * ZEXPORT get_crc_table()
static const z_crc_t FAR * ZEXPORT get_crc_table()
{
#ifdef DYNAMIC_CRC_TABLE
if (crc_table_empty)

View File

@@ -1,6 +1,8 @@
#ifndef __CKSUM_H
#define __CKSUM_H
#include <stdint.h>
#include <sys/types.h>
#include <lk/compiler.h>
__BEGIN_CDECLS
@@ -21,8 +23,12 @@ unsigned short crc16(const unsigned char *buf, unsigned int length);
unsigned short update_crc16(unsigned short crc, const unsigned char *buf, unsigned int len);
unsigned long crc32(unsigned long crc, const unsigned char *buf, unsigned int len);
unsigned long crc32_combine(unsigned long, unsigned long, off_t len2);
unsigned long crc32_combine64(unsigned long, unsigned long, int64_t len2);
unsigned long adler32(unsigned long adler, const unsigned char *buf, unsigned int len);
unsigned long adler32_combine(unsigned long adler1, unsigned long adler2, off_t len2);
unsigned long adler32_combine64(unsigned long adler1, unsigned long adler2, int64_t len2);
__END_CDECLS