Skip to content

Commit a98682b

Browse files
committed
Add more warnings check and fix warnings
1 parent edec1c9 commit a98682b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ add_compile_options(
197197
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wextra>
198198
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wpedantic>
199199
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Werror>
200+
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wunused-variable>
200201
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Weverything>
201202

202203
# TODO: Add in other Compilers here.

source/FreeRTOS_DNS_Parser.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,9 @@
313313
xSet.usPortNumber = usPort;
314314
xSet.ppxLastAddress = &( xSet.pxLastAddress );
315315

316-
#if ( ipconfigUSE_LLMNR == 1 )
317-
uint16_t usType = 0U;
318-
uint16_t usClass = 0U;
319-
#endif
316+
uint16_t usType = 0U;
317+
uint16_t usClass = 0U;
318+
320319
#if ( ipconfigUSE_DNS_CACHE == 1 ) || ( ipconfigDNS_USE_CALLBACKS == 1 )
321320
xSet.xDoStore = xExpected;
322321
#endif
@@ -629,6 +628,10 @@
629628
/* The IP-address found will be returned. */
630629
}
631630

631+
632+
( void ) usType;
633+
( void ) usClass;
634+
632635
return ulIPAddress;
633636
}
634637

0 commit comments

Comments
 (0)