Fixed compiler warning messages.
This commit is contained in:
@@ -270,9 +270,10 @@ void MyReadPropertyMultipleAckHandler(
|
||||
static void Init_Service_Handlers(
|
||||
void)
|
||||
{
|
||||
uint32_t Object_Instance;
|
||||
Device_Init();
|
||||
|
||||
#if BAC_ROUTING
|
||||
uint32_t Object_Instance;
|
||||
/* Put this client Device into the Routing table (first entry) */
|
||||
Object_Instance = Device_Object_Instance_Number();
|
||||
Add_Routed_Device( Object_Instance, Device_Object_Name(),
|
||||
@@ -835,7 +836,8 @@ int CheckCommandLineArgs(
|
||||
My_BIP_Port = (uint16_t) strtol(argv[i], NULL, 0);
|
||||
/* Used strtol so sport can be either 0xBAC0 or 47808 */
|
||||
break;
|
||||
case 'n': /* Destination Network Number */
|
||||
case 'n':
|
||||
/* Destination Network Number */
|
||||
if ( Target_Address.mac_len == 0 )
|
||||
fprintf(stderr, "Must provide a Target MAC before DNET \r\n");
|
||||
if (++i < argc)
|
||||
@@ -844,13 +846,21 @@ int CheckCommandLineArgs(
|
||||
break;
|
||||
case 't':
|
||||
if (++i < argc) {
|
||||
uint8_t *mac = Target_Address.mac;
|
||||
/* The %hhx specifies unsigned char */
|
||||
Target_Address.mac_len =
|
||||
sscanf(argv[i], "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",
|
||||
/* decoded MAC addresses */
|
||||
unsigned mac[6];
|
||||
/* number of successful decodes */
|
||||
int count;
|
||||
/* loop counter */
|
||||
unsigned j;
|
||||
count =
|
||||
sscanf(argv[i], "%x:%x:%x:%x:%x:%x",
|
||||
&mac[0], &mac[1], &mac[2], &mac[3], &mac[4],
|
||||
&mac[5]);
|
||||
if (Target_Address.mac_len == 6) { /* success */
|
||||
if (count == 6) { /* success */
|
||||
Target_Address.mac_len = count;
|
||||
for (j = 0; j < 6; j++) {
|
||||
Target_Address.mac[j] = (uint8_t) mac[j];
|
||||
}
|
||||
Target_Address.net = 0;
|
||||
Target_Address.len = 0; /* No src address */
|
||||
Provided_Targ_MAC = true;
|
||||
|
||||
@@ -182,7 +182,7 @@ int Analog_Input_Read_Property(
|
||||
return 0;
|
||||
}
|
||||
apdu = rpdata->application_data;
|
||||
switch (rpdata->object_property) {
|
||||
switch ((int)rpdata->object_property) {
|
||||
case PROP_OBJECT_IDENTIFIER:
|
||||
apdu_len =
|
||||
encode_application_object_id(&apdu[0], OBJECT_ANALOG_INPUT,
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
/** @file bigend.c Determination of Endianess */
|
||||
|
||||
#include "bigend.h"
|
||||
|
||||
/* Big-Endian systems save the most significant byte first. */
|
||||
/* Sun and Motorola processors, IBM-370s and PDP-10s are big-endian. */
|
||||
/* "Network Byte Order" is also know as "Big-Endian Byte Order" */
|
||||
|
||||
Reference in New Issue
Block a user