Added missing return result to fix compiler warning.

This commit is contained in:
skarg
2011-10-03 14:00:25 +00:00
parent b8dcdee79a
commit 2ffdc9bc53
+5 -5
View File
@@ -1249,6 +1249,7 @@ int bvlc_for_non_bbmd(
uint16_t received_bytes) uint16_t received_bytes)
{ {
uint16_t result_code = 0; /* aka, BVLC_RESULT_SUCCESSFUL_COMPLETION */ uint16_t result_code = 0; /* aka, BVLC_RESULT_SUCCESSFUL_COMPLETION */
BVLC_Function_Code = npdu[1]; /* The BVLC function */ BVLC_Function_Code = npdu[1]; /* The BVLC function */
switch (BVLC_Function_Code) { switch (BVLC_Function_Code) {
case BVLC_RESULT: case BVLC_RESULT:
@@ -1291,6 +1292,8 @@ int bvlc_for_non_bbmd(
bvlc_send_result(sout, result_code); bvlc_send_result(sout, result_code);
debug_printf("BVLC: NAK code=%d\n", result_code); debug_printf("BVLC: NAK code=%d\n", result_code);
} }
return result_code;
} }
/** Returns the last BVLL Result we received, either as the result of a BBMD /** Returns the last BVLL Result we received, either as the result of a BBMD
@@ -1301,7 +1304,7 @@ int bvlc_for_non_bbmd(
* BVLC_RESULT_REGISTER_FOREIGN_DEVICE_NAK if registration failed, * BVLC_RESULT_REGISTER_FOREIGN_DEVICE_NAK if registration failed,
* or one of the other codes (if we are a BBMD). * or one of the other codes (if we are a BBMD).
*/ */
BACNET_BVLC_RESULT bvlc_get_last_result() BACNET_BVLC_RESULT bvlc_get_last_result(void)
{ {
return BVLC_Result_Code; return BVLC_Result_Code;
} }
@@ -1313,14 +1316,11 @@ BACNET_BVLC_RESULT bvlc_get_last_result()
* *
* @return A BVLC_ code, such as BVLC_ORIGINAL_UNICAST_NPDU. * @return A BVLC_ code, such as BVLC_ORIGINAL_UNICAST_NPDU.
*/ */
BACNET_BVLC_FUNCTION bvlc_get_function_code() BACNET_BVLC_FUNCTION bvlc_get_function_code(void)
{ {
return BVLC_Function_Code; return BVLC_Function_Code;
} }
#ifdef TEST #ifdef TEST
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>