Commit e2235eac authored by Adam Wujek's avatar Adam Wujek

remove warnings

New warnings are reported by a newer version of gcc used for RISCV
Signed-off-by: 's avatarAdam Wujek <dev_public@wujek.eu>
parent 15cf7632
......@@ -283,7 +283,7 @@ char *interval_to_string(TimeInterval time)
}
nanos = time >> TIME_INTERVAL_FRACBITS;
picos = (((time & TIME_INTERVAL_FRACMASK) * 1000) + TIME_INTERVAL_ROUNDING_VALUE ) >> TIME_INTERVAL_FRACBITS;
pp_sprintf(time_as_string,"%c%" PRId64 ".%03d", sign, nanos, picos);
pp_sprintf(time_as_string, "%c%" PRId64 ".%03d", sign, nanos, (unsigned int) picos);
return time_as_string;
}
......@@ -310,6 +310,6 @@ char *relative_interval_to_string(RelativeDifference time)
sub_yocto += bitWeight;
bitWeight /= 2;
}
pp_sprintf(time_as_string,"%c%"PRId32".%018Ld", sign, nsecs, sub_yocto);
pp_sprintf(time_as_string,"%c%"PRId32".%018Ld", sign, (int) nsecs, sub_yocto);
return time_as_string;
}
......@@ -118,7 +118,7 @@ static int wr_handle_followup(struct pp_instance *ppi)
return wr_sync_followup(ppi);
}
static int wr_handle_presp(struct pp_instance *ppi)
__attribute__((unused)) static int wr_handle_presp(struct pp_instance *ppi)
{
if ( ppi->extState==PP_EXSTATE_ACTIVE ) {
wr_servo_got_presp(ppi);
......
......@@ -7,6 +7,7 @@
*/
#include <ppsi/ppsi.h>
#include "wrc_ptp.h"
/*
* This is the last WR state: ack the other party and go master or slave.
......@@ -27,7 +28,6 @@ int wr_link_on(struct pp_instance *ppi, void *buf, int len, int new_state)
wrp->next_state=WRS_IDLE;
#ifdef CONFIG_ABSCAL
#include "wrc_ptp.h"
/*
* absolute calibration only exists in arch-wrpc, so far, but
* we can't include wrpc headers, not available in wrs builds
......
......@@ -334,9 +334,9 @@ static void dump_payload(char *prefix, void *pl, int len)
ntohs(h->messageLength), h->domainNumber);
printf("%sFLAGS: 0x%02x%02x (correction 0x%08x:%08x %08u)\n",
prefix, (unsigned) h->flagField[0],(unsigned) h->flagField[1],
ntohl(*(int *)cfptr),
ntohl(*(int *)(cfptr + 4)),
ntohl(*(int *)(cfptr + 4)));
(int) ntohl(*(int *)cfptr),
(int) ntohl(*(int *)(cfptr + 4)),
(int) ntohl(*(int *)(cfptr + 4)));
dump_1port(prefix, "PORT: ", h->sourcePortIdentity);
printf("%sREST: seq %i, ctrl %i, log-interval %i\n", prefix,
ntohs(h->sequenceId), h->controlField, h->logMessageInterval);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment