Skip to content

Commit

Permalink
Bug fix---surpress spurious warnings from clang and MSVC
Browse files Browse the repository at this point in the history
I'm not a fan of casts for casts sake and these warnings are, in my opinion,
noise because they warn of normal C behavior.
  • Loading branch information
spc476 committed Feb 11, 2023
2 parents 5e690c4 + 20c6eb4 commit 3c9d52f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ UNAME := $(shell uname)
VERSION := $(shell git describe --tag)

ifeq ($(VERSION),)
VERSION=v2.0.7
VERSION=v2.0.8
endif

# ===================================================
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package = "org.conman.dns"
version = "2.0.7-1"
version = "2.0.8-1"

source =
{
url = "git+https://github.com/spc476/SPCDNS.git",
tag = "v2.0.7"
tag = "v2.0.8"
}

description =
Expand Down
7 changes: 7 additions & 0 deletions src/codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@

#include "dns.h"

#if defined(__clang__)
# pragma clang diagnostic ignored "-Wshorten-64-to-32"
#elif defined(_MSC_VER)
# pragma warning(disable:4244) /* ignore float to integer type conversion */
# pragma warning(disable:4267) /* ignore size_t to smaller type conversion */
#endif

/*----------------------------------------------------------------------------
; The folowing are used for memory allocation. dns_decoded_t should be fine
; for alignment size, as it's good enough for alignment. If some odd-ball
Expand Down

0 comments on commit 3c9d52f

Please sign in to comment.