clang-tidy: Add prototype to function declarations
Replaced function declarations without prototypes with proper
prototypes to comply with modern C standards and resolve
deprecation warnings.
'''
error: a function declaration without a prototype is deprecated in all versions of C [clang-diagnostic-strict-prototypes]
'''
Tested: Build verified
Change-Id: Ia85ad603623aa64e157dd7550d8023e6861d9201
Signed-off-by: Jayanth Othayoth <ojayanth@gmail.com>
diff --git a/include/libbej/bej_dictionary.h b/include/libbej/bej_dictionary.h
index 81d77dc..807abee 100644
--- a/include/libbej/bej_dictionary.h
+++ b/include/libbej/bej_dictionary.h
@@ -57,7 +57,7 @@
*
* @return the offset to the first property.
*/
-uint16_t bejDictGetPropertyHeadOffset();
+uint16_t bejDictGetPropertyHeadOffset(void);
/**
* @brief Get the offset of the first annotated property in an annoation
@@ -66,7 +66,7 @@
* @return the offset to the first annotated property in an annoation
* dictionary.
*/
-uint16_t bejDictGetFirstAnnotatedPropertyOffset();
+uint16_t bejDictGetFirstAnnotatedPropertyOffset(void);
/**
* @brief Get the property related to the given sequence number.
diff --git a/src/bej_dictionary.c b/src/bej_dictionary.c
index c0481b3..15bbc89 100644
--- a/src/bej_dictionary.c
+++ b/src/bej_dictionary.c
@@ -61,13 +61,13 @@
return true;
}
-uint16_t bejDictGetPropertyHeadOffset()
+uint16_t bejDictGetPropertyHeadOffset(void)
{
// First property is present soon after the dictionary header.
return sizeof(struct BejDictionaryHeader);
}
-uint16_t bejDictGetFirstAnnotatedPropertyOffset()
+uint16_t bejDictGetFirstAnnotatedPropertyOffset(void)
{
// The first property available is the "Annotations" set which is the parent
// for all properties. Next immediate property is the first property we