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