Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Makefile and fix signed warning for j1939-timedate tools #545

Merged
merged 2 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 32 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ CPPFLAGS += \
PROGRAMS_CANGW := \
cangw

PROGRAMS_J1939_TIMEDATE := \
j1939-timedate-srv \
j1939-timedate-cli

PROGRAMS_ISOBUSFS := \
isobusfs-srv \
isobusfs-cli
Expand Down Expand Up @@ -93,6 +97,7 @@ PROGRAMS_SLCAN := \

PROGRAMS := \
$(PROGRAMS_CANGW) \
$(PROGRAMS_J1939_TIMEDATE) \
$(PROGRAMS_ISOBUSFS) \
$(PROGRAMS_ISOTP) \
$(PROGRAMS_J1939) \
Expand Down Expand Up @@ -121,7 +126,7 @@ endif
all: $(PROGRAMS)

clean:
rm -f $(PROGRAMS) *.o mcp251xfd/*.o isobusfs/*.o
rm -f $(PROGRAMS) *.o mcp251xfd/*.o isobusfs/*.o j1939_timedate/*.o

install:
mkdir -p $(DESTDIR)$(PREFIX)/bin
Expand All @@ -139,13 +144,15 @@ cansend.o: lib.h
log2asc.o: lib.h
log2long.o: lib.h
slcanpty.o: lib.h
j1939acd.o: libj1939.h
j1939cat.o: libj1939.h
j1939spy.o: libj1939.h
j1939sr.o: libj1939.h
testj1939.o: libj1939.h
isobusfs_srv.o: lib.h
isobusfs_c.o: lib.h
j1939acd.o: lib.h libj1939.h
j1939cat.o: lib.h libj1939.h
j1939spy.o: lib.h libj1939.h
j1939sr.o: lib.h libj1939.h
testj1939.o: lib.h libj1939.h
isobusfs_srv.o: lib.h libj1939.h
isobusfs_c.o: lib.h libj1939.h
j1939_timedate_srv.o: lib.h libj1939.h
j1939_timedate_cli.o: lib.h libj1939.h
canframelen.o: canframelen.h

asc2log: asc2log.o lib.o
Expand All @@ -159,13 +166,24 @@ cansequence: cansequence.o lib.o
log2asc: log2asc.o lib.o
log2long: log2long.o lib.o
slcanpty: slcanpty.o lib.o
j1939acd: j1939acd.o libj1939.o
j1939cat: j1939cat.o libj1939.o
j1939spy: j1939spy.o libj1939.o
j1939sr: j1939sr.o libj1939.o
testj1939: testj1939.o libj1939.o
j1939acd: j1939acd.o lib.o libj1939.o
j1939cat: j1939cat.o lib.o libj1939.o
j1939spy: j1939spy.o lib.o libj1939.o
j1939sr: j1939sr.o lib.o libj1939.o
testj1939: testj1939.o lib.o libj1939.o

j1939-timedate-srv: lib.o \
libj1939.o \
j1939_timedate/j1939_timedate_srv.o
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@

j1939-timedate-cli: lib.o \
libj1939.o \
j1939_timedate/j1939_timedate_cli.o
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@

isobusfs-srv: lib.o \
libj1939.o \
isobusfs/isobusfs_cmn.o \
isobusfs/isobusfs_srv.o \
isobusfs/isobusfs_srv_cm.o \
Expand All @@ -178,6 +196,7 @@ isobusfs-srv: lib.o \
$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@

isobusfs-cli: lib.o \
libj1939.o \
isobusfs/isobusfs_cmn.o \
isobusfs/isobusfs_cli.o \
isobusfs/isobusfs_cli_cm.o \
Expand Down
2 changes: 1 addition & 1 deletion j1939_timedate/j1939_timedate_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static void print_time_date_packet(struct j1939_timedate_cli_priv *priv,
double actual_seconds;
double actual_day;

if (msg->len < sizeof(*tdp)) {
if (msg->len < (int)sizeof(*tdp)) {
pr_warn("received too short time and date packet: %zi",
msg->len);
return;
Expand Down
Loading