Skip to content

Commit

Permalink
Suppress notused warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisHeimbigner committed Oct 19, 2020
1 parent 26bf818 commit 044a4b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 8 additions & 0 deletions libdap4/d4util.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,3 +459,11 @@ NCD4_errorNC(int code, const int line, const char* file)
{
return NCD4_error(code,line,file,nc_strerror(code));
}

d4size_t
NCD4_getcounter(void* p)
{
COUNTERTYPE v;
memcpy(&v,p,sizeof(v));
return (d4size_t)v;
}
5 changes: 2 additions & 3 deletions libdap4/ncd4.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,8 @@ extern int nc__dap4(void);
see: https://sourceforge.net/p/predef/wiki/Architectures/
*/
#if defined(__arm__) && __ARM_ARCH < 8
static d4size_t
GETCOUNTER(void* p)
{COUNTERTYPE v; memcpy(v,p,sizeof(v)); return (d4size_t)v;}
EXTERNL d4size_t NCD4_getcounter(void* p);
#define GETCOUNTER(p) NCD4_getcounter(p)
#else
#define GETCOUNTER(p) ((d4size_t)*((COUNTERTYPE*)(p)))
#endif /*defined(__arm__) && __ARM_ARCH < 8*/
Expand Down

0 comments on commit 044a4b2

Please sign in to comment.