Skip to content

Commit

Permalink
Fix use of extern C block (#981)
Browse files Browse the repository at this point in the history
* Fix use of extern C block

* Uncrustify: triggered by comment.

---------

Co-authored-by: GitHub Action <[email protected]>
moninom1 and actions-user authored Jul 26, 2023
1 parent 5e1c991 commit 14b3e24
Showing 27 changed files with 135 additions and 135 deletions.
11 changes: 5 additions & 6 deletions source/include/FreeRTOS_ARP.h
Original file line number Diff line number Diff line change
@@ -28,17 +28,16 @@
#ifndef FREERTOS_ARP_H
#define FREERTOS_ARP_H

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/* Application level configuration options. */
#include "FreeRTOSIPConfig.h"
#include "FreeRTOSIPConfigDefaults.h"
#include "IPTraceMacroDefaults.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */
/*-----------------------------------------------------------*/
/* Miscellaneous structure and definitions. */
/*-----------------------------------------------------------*/
10 changes: 5 additions & 5 deletions source/include/FreeRTOS_DHCP.h
Original file line number Diff line number Diff line change
@@ -28,18 +28,18 @@
#ifndef FREERTOS_DHCP_H
#define FREERTOS_DHCP_H

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif

#include "FreeRTOS_Sockets.h"
#include "FreeRTOS_Routing.h"

/* Application level configuration options. */
#include "FreeRTOSIPConfig.h"
#include "IPTraceMacroDefaults.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif

#if ( ipconfigUSE_DHCP != 0 ) && ( ipconfigNETWORK_MTU < 586U )

/* DHCP must be able to receive an options field of 312 bytes, the fixed
8 changes: 4 additions & 4 deletions source/include/FreeRTOS_DHCPv6.h
Original file line number Diff line number Diff line change
@@ -26,15 +26,15 @@
#ifndef FREERTOS_DHCPV6_H
#define FREERTOS_DHCPV6_H

#ifdef __cplusplus
extern "C" {
#endif

/* Application level configuration options. */
#include "FreeRTOS_DHCP.h"
#include "FreeRTOSIPConfig.h"
#include "IPTraceMacroDefaults.h"

#ifdef __cplusplus
extern "C" {
#endif

/* IPv6 option numbers. */
/** @brief IPv6 DHCP option number - Solicit */
#define DHCPv6_message_Type_Solicit 1U
10 changes: 5 additions & 5 deletions source/include/FreeRTOS_DNS.h
Original file line number Diff line number Diff line change
@@ -28,17 +28,17 @@
#ifndef FREERTOS_DNS_H
#define FREERTOS_DNS_H

/* Application level configuration options. */
#include "FreeRTOS_DNS_Globals.h"
#include "FreeRTOS_DNS_Callback.h"
#include "FreeRTOS_DNS_Cache.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/* Application level configuration options. */
#include "FreeRTOS_DNS_Globals.h"
#include "FreeRTOS_DNS_Callback.h"
#include "FreeRTOS_DNS_Cache.h"

/*
* LLMNR is very similar to DNS, so is handled by the DNS routines.
*/
13 changes: 7 additions & 6 deletions source/include/FreeRTOS_DNS_Callback.h
Original file line number Diff line number Diff line change
@@ -29,12 +29,6 @@
#ifndef FREERTOS_DNS_CALLBACK_H
#define FREERTOS_DNS_CALLBACK_H

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/* FreeRTOS includes. */
#include "FreeRTOS.h"

@@ -45,6 +39,13 @@

/* Standard includes. */
#include <stdint.h>

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/* Application level configuration options. */

#if ( ( ipconfigDNS_USE_CALLBACKS == 1 ) && ( ipconfigUSE_DNS != 0 ) )
12 changes: 6 additions & 6 deletions source/include/FreeRTOS_ICMP.h
Original file line number Diff line number Diff line change
@@ -33,12 +33,6 @@
#ifndef FREERTOS_ICMP_H
#define FREERTOS_ICMP_H

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/* Standard includes. */
#include <stdint.h>
#include <stdio.h>
@@ -61,6 +55,12 @@
#include "NetworkBufferManagement.h"
#include "FreeRTOS_DNS.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/* ICMP protocol definitions. */
#define ipICMP_ECHO_REQUEST ( ( uint8_t ) 8 ) /**< ICMP echo request. */
#define ipICMP_ECHO_REPLY ( ( uint8_t ) 0 ) /**< ICMP echo reply. */
12 changes: 6 additions & 6 deletions source/include/FreeRTOS_IP.h
Original file line number Diff line number Diff line change
@@ -28,12 +28,6 @@
#ifndef FREERTOS_IP_H
#define FREERTOS_IP_H

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

#include "FreeRTOS.h"
#include "task.h"

@@ -43,6 +37,12 @@
#include "FreeRTOS_IP_Common.h"
#include "IPTraceMacroDefaults.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/* Constants defining the current version of the FreeRTOS+TCP
* network stack. */
#define ipFR_TCP_VERSION_NUMBER "V4.0.999"
11 changes: 6 additions & 5 deletions source/include/FreeRTOS_IP_Private.h
Original file line number Diff line number Diff line change
@@ -27,11 +27,6 @@

#ifndef FREERTOS_IP_PRIVATE_H
#define FREERTOS_IP_PRIVATE_H
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/* Application level configuration options. */
#include "FreeRTOSIPConfig.h"
@@ -50,6 +45,12 @@

#include "event_groups.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

#ifdef TEST
int ipFOREVER( void );
#else
12 changes: 6 additions & 6 deletions source/include/FreeRTOS_IP_Timers.h
Original file line number Diff line number Diff line change
@@ -33,12 +33,6 @@
#ifndef FREERTOS_IP_TIMERS_H
#define FREERTOS_IP_TIMERS_H

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/* Standard includes. */
#include <stdint.h>
#include <stdio.h>
@@ -61,6 +55,12 @@
#include "NetworkBufferManagement.h"
#include "FreeRTOS_DNS.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/*
* Checks the ARP, DHCP and TCP timers to see if any periodic or timeout
* processing is required.
18 changes: 9 additions & 9 deletions source/include/FreeRTOS_IP_Utils.h
Original file line number Diff line number Diff line change
@@ -25,20 +25,14 @@
* http://www.FreeRTOS.org
*/

#ifndef FREERTOS_IP_UTILS_H
#define FREERTOS_IP_UTILS_H

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/**
* @file FreeRTOS_IP_Utils.h
* @brief Implements the utility functions for FreeRTOS_IP.c
*/

#ifndef FREERTOS_IP_UTILS_H
#define FREERTOS_IP_UTILS_H

/* Standard includes. */
#include <stdint.h>
#include <stdio.h>
@@ -65,6 +59,12 @@
#include "FreeRTOS_IPv4_Utils.h"
#include "FreeRTOS_IPv6_Utils.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

#if ( ipconfigUSE_DHCP != 0 )

/**
12 changes: 6 additions & 6 deletions source/include/FreeRTOS_IPv4.h
Original file line number Diff line number Diff line change
@@ -28,12 +28,6 @@
#ifndef FREERTOS_IPV4_H
#define FREERTOS_IPV4_H

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

#include "FreeRTOS.h"
#include "task.h"
#include "FreeRTOS_IP.h"
@@ -43,6 +37,12 @@
#include "FreeRTOSIPConfigDefaults.h"
#include "IPTraceMacroDefaults.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

#define ipSIZE_OF_IPv4_HEADER 20U
#define ipSIZE_OF_IPv4_ADDRESS 4U
#define ipSIZE_OF_ICMPv4_HEADER 8U
5 changes: 3 additions & 2 deletions source/include/FreeRTOS_IPv4_Private.h
Original file line number Diff line number Diff line change
@@ -27,14 +27,15 @@

#ifndef FREERTOS_IPV4_PRIVATE_H
#define FREERTOS_IPV4_PRIVATE_H

#include "FreeRTOS_IP_Private.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

#include "FreeRTOS_IP_Private.h"

/* The maximum UDP payload length. */
#define ipMAX_UDP_PAYLOAD_LENGTH ( ( ipconfigNETWORK_MTU - ipSIZE_OF_IPv4_HEADER ) - ipSIZE_OF_UDP_HEADER )

8 changes: 4 additions & 4 deletions source/include/FreeRTOS_IPv4_Sockets.h
Original file line number Diff line number Diff line change
@@ -28,16 +28,16 @@
#ifndef FREERTOS_IPV4_SOCKETS_H
#define FREERTOS_IPV4_SOCKETS_H

#ifdef __cplusplus
extern "C" {
#endif

/* Standard includes. */
#include <string.h>

/* FreeRTOS includes. */
#include "FreeRTOS.h"

#ifdef __cplusplus
extern "C" {
#endif


/* Translate from 192.168.1.1 to a 32-bit number. */
BaseType_t FreeRTOS_inet_pton4( const char * pcSource,
12 changes: 6 additions & 6 deletions source/include/FreeRTOS_IPv4_Utils.h
Original file line number Diff line number Diff line change
@@ -28,12 +28,6 @@
#ifndef FREERTOS_IPV4_UTILS_H
#define FREERTOS_IPV4_UTILS_H

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/**
* @file FreeRTOS_IPv4_Utils.h
* @brief Implements the utility functions for FreeRTOS_IP.c
@@ -49,6 +43,12 @@
/* FreeRTOS+TCP includes. */
#include "FreeRTOS_IP.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/* Set the MAC-address that belongs to a given IPv4 multi-cast address. */
void vSetMultiCastIPv4MacAddress( uint32_t ulIPAddress,
MACAddress_t * pxMACAddress );
12 changes: 6 additions & 6 deletions source/include/FreeRTOS_IPv6.h
Original file line number Diff line number Diff line change
@@ -26,18 +26,18 @@
#ifndef FREERTOS_IPV6_H
#define FREERTOS_IPV6_H

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

#include "FreeRTOS.h"
#include "task.h"
#include "FreeRTOS_IP.h"
#include "FreeRTOS_IP_Common.h"
#include "FreeRTOS_IPv6_Private.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/* Some constants defining the sizes of several parts of a packet.
* These defines come before including the configuration header files. */
#define ipSIZE_OF_IPv6_HEADER 40U
11 changes: 6 additions & 5 deletions source/include/FreeRTOS_IPv6_Private.h
Original file line number Diff line number Diff line change
@@ -27,11 +27,6 @@

#ifndef FREERTOS_IPV6_PRIVATE_H
#define FREERTOS_IPV6_PRIVATE_H
/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/* Application level configuration options. */
#include "FreeRTOSIPConfig.h"
@@ -49,6 +44,12 @@

#include "event_groups.h"

/* *INDENT-OFF* */
#ifdef __cplusplus
extern "C" {
#endif
/* *INDENT-ON* */

/* MISRA Ref 20.5.1 [Use of undef] */
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-2051 */
/* coverity[misra_c_2012_rule_20_5_violation] */
Loading

0 comments on commit 14b3e24

Please sign in to comment.