Fix conversion warning in flag set/check/clear macros

This commit is contained in:
Peter Hill 2024-04-25 09:39:57 +01:00
parent 40b7cfc7be
commit 54fb03e69b
No known key found for this signature in database
GPG Key ID: 0C6B9742E72848EE
2 changed files with 4 additions and 3 deletions

View File

@ -17,9 +17,9 @@ affect the operation of the system.
*/
typedef unsigned int NCFLAGS;
# define SETFLAG(controls,flag) (((controls).flags) |= (flag))
# define CLRFLAG(controls,flag) (((controls).flags) &= ~(flag))
# define FLAGSET(controls,flag) (((controls.flags) & (flag)) != 0)
#define SETFLAG(controls,flag) (((controls).flags) |= (NCFLAGS)(flag))
#define CLRFLAG(controls,flag) (((controls).flags) &= ~(NCFLAGS)(flag))
#define FLAGSET(controls,flag) ((((controls).flags) & (NCFLAGS)(flag)) != 0)
/* Defined flags */
#define NCF_NC3 (0x0001) /* DAP->netcdf-3 */

View File

@ -13,6 +13,7 @@ are defined here.
#undef COMPILEBYDEFAULT
#include "ncdap.h"
#include "ncrc.h"
#include "ncauth.h"