Skip to content

Commit 2129f44

Browse files
fix cpplint C errors
Signed-off-by: Martin Melik Merkumians <[email protected]>
1 parent f896f89 commit 2129f44

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+315
-192
lines changed

.mega-linter.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ DISABLE_LINTERS:
1717
C_CLANG_FORMAT_ARGUMENTS: "--style=file"
1818

1919
# cpplint specific configuration
20+
# Use `source` as root so header-guard checks for headers under `source/tests`
21+
# don't require an extra `SOURCE_` prefix when file paths are evaluated.
2022
C_CPPLINT_ARGUMENTS:
21-
- "--root=source/src"
23+
- "--root=source"
2224
- "--filter=-whitespace/line_length,-readability/casting,-build/include_what_you_use"
2325
- "--recursive"
2426
CPP_CPPLINT_ARGUMENTS:
25-
- "--root=source/src"
27+
- "--root=source"
2628
- "--filter=-whitespace/line_length,-readability/casting,-build/include_what_you_use"
2729
- "--recursive"
2830

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repos:
2121
- id: cpplint
2222
types_or: [c, c++, header]
2323
args:
24-
- "--root=source/src"
24+
- "--root=source"
2525
- "--filter=-whitespace/line_length,-readability/casting,-build/include_what_you_use"
2626
- "--recursive"
2727

AUTHORS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ Kurt Schweiger
22
Rene Smodic
33
Alois Zoitl
44
Jonathan Engdahl
5+
Martin Melik Merkumians
6+
Ingo Hegny

source/src/api/opener_api.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* All rights reserved.
44
*
55
******************************************************************************/
6-
#ifndef API_OPENER_API_H_
7-
#define API_OPENER_API_H_
6+
#ifndef SRC_API_OPENER_API_H_
7+
#define SRC_API_OPENER_API_H_
88

99
#include <assert.h>
1010
#include <stdbool.h>
@@ -1178,4 +1178,4 @@ void RegisterTimeoutChecker(TimeoutCheckerFunction timeout_checker_function);
11781178
*
11791179
*/
11801180

1181-
#endif // API_OPENER_API_H_
1181+
#endif // SRC_API_OPENER_API_H_

source/src/cip/appcontype.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* All rights reserved.
44
*
55
******************************************************************************/
6-
#ifndef CIP_APPCONTYPE_H_
7-
#define CIP_APPCONTYPE_H_
6+
#ifndef SRC_CIP_APPCONTYPE_H_
7+
#define SRC_CIP_APPCONTYPE_H_
88

99
#include "cip/cipconnectionmanager.h"
1010

@@ -73,4 +73,4 @@ void CloseAllConnections(void);
7373
*/
7474
bool ConnectionWithSameConfigPointExists(const EipUint32 config_point);
7575

76-
#endif // CIP_APPCONTYPE_H_
76+
#endif // SRC_CIP_APPCONTYPE_H_

source/src/cip/cipassembly.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* All rights reserved.
44
*
55
******************************************************************************/
6-
#ifndef CIP_CIPASSEMBLY_H_
7-
#define CIP_CIPASSEMBLY_H_
6+
#ifndef SRC_CIP_CIPASSEMBLY_H_
7+
#define SRC_CIP_CIPASSEMBLY_H_
88

99
#include "cip/ciptypes.h"
1010
#include "core/typedefs.h"
@@ -58,4 +58,4 @@ EipStatus NotifyAssemblyConnectedDataReceived(CipInstance* const instance,
5858
const EipUint8* const data,
5959
const size_t data_length);
6060

61-
#endif // CIP_CIPASSEMBLY_H_
61+
#endif // SRC_CIP_CIPASSEMBLY_H_

source/src/cip/cipclass3connection.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
******************************************************************************/
66

7-
#ifndef CIP_CIPCLASS3CONNECTION_H_
8-
#define CIP_CIPCLASS3CONNECTION_H_
7+
#ifndef SRC_CIP_CIPCLASS3CONNECTION_H_
8+
#define SRC_CIP_CIPCLASS3CONNECTION_H_
99

1010
/** @file cipclass3connection.h
1111
* @brief CIP Class 3 connection
@@ -62,4 +62,4 @@ CipError EstablishClass3Connection(
6262
*/
6363
void InitializeClass3ConnectionData(void);
6464

65-
#endif /* CIP_CIPCLASS3CONNECTION_H_ */
65+
#endif /* SRC_CIP_CIPCLASS3CONNECTION_H_ */

source/src/cip/cipcommon.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* All rights reserved.
44
*
55
******************************************************************************/
6-
#ifndef CIP_CIPCOMMON_H_
7-
#define CIP_CIPCOMMON_H_
6+
#ifndef SRC_CIP_CIPCOMMON_H_
7+
#define SRC_CIP_CIPCOMMON_H_
88

99
/** @file cipcommon.h
1010
* Common CIP object interface

source/src/cip/cipconnectionmanager.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* All rights reserved.
44
*
55
******************************************************************************/
6-
#ifndef CIP_CIPCONNECTIONMANAGER_H_
7-
#define CIP_CIPCONNECTIONMANAGER_H_
6+
#ifndef SRC_CIP_CIPCONNECTIONMANAGER_H_
7+
#define SRC_CIP_CIPCONNECTIONMANAGER_H_
88

99
#include "api/opener_api.h"
1010
#include "cip/cipconnectionobject.h"
@@ -321,4 +321,4 @@ void CheckForTimedOutConnectionsAndCloseTCPConnections(
321321
const CipConnectionObject* const connection_object,
322322
CloseSessionFunction CloseSessions);
323323

324-
#endif // CIP_CIPCONNECTIONMANAGER_H_
324+
#endif // SRC_CIP_CIPCONNECTIONMANAGER_H_

source/src/cip/cipconnectionobject.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
*
55
******************************************************************************/
66

7-
#ifndef CIP_CIPCONNECTIONOBJECT_H_
8-
#define CIP_CIPCONNECTIONOBJECT_H_
7+
#ifndef SRC_CIP_CIPCONNECTIONOBJECT_H_
8+
#define SRC_CIP_CIPCONNECTIONOBJECT_H_
99

1010
#include "api/opener_api.h"
1111
#include "cip/cipelectronickey.h"
@@ -508,4 +508,4 @@ bool CipConnectionObjectOriginatorHasSameIP(
508508
const CipConnectionObject* const connection_object,
509509
const struct sockaddr* const originator_address);
510510

511-
#endif // CIP_CIPCONNECTIONOBJECT_H_
511+
#endif // SRC_CIP_CIPCONNECTIONOBJECT_H_

0 commit comments

Comments
 (0)