Fix missing forward declarations

re: issue https://github.com/Unidata/netcdf-c/issues/1687

static functions are being used before decl and it causes
errors. Only occurs when BIG_ENDIAN is defined.
Solution is to add the forward declarations.
This commit is contained in:
Dennis Heimbigner 2020-04-03 20:15:34 -06:00
parent 03b3b89097
commit 6f86660da8
3 changed files with 10 additions and 0 deletions

View File

@ -40,6 +40,10 @@ Unified filter related code
/* Forward */
static int gettype(const int q0, const int q1, int* unsignedp);
#ifdef WORDS_BIGENDIAN
static void byteswap8(unsigned char* mem);
static void byteswap4(unsigned char* mem);
#endif
const struct LegalFormat {
const char* tag;

View File

@ -122,6 +122,11 @@ static const char* spectype[] = {"i", "b", "ub", "s", "us", "i", "ui", "i", "i",
static int nerrs = 0;
#ifdef WORDS_BIGENDIAN
static void byteswap8(unsigned char* mem);
static void byteswap4(unsigned char* mem);
#endif
static void
mismatch(size_t i, unsigned int *params, const char* tag)
{

View File

@ -4,6 +4,7 @@
*/
#include "config.h"
#include <hdf5.h>
/*