Skip to content

Commit 0897c74

Browse files
committed
CO_app_STM32.c: Fix printf format specifiers
1 parent 0d63f71 commit 0897c74

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

CANopenNode_STM32/CO_app_STM32.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ canopen_app_init(CANopenNodeSTM32* _canopenNodeSTM32) {
9090
log_printf("Error: Can't allocate memory\n");
9191
return 1;
9292
} else {
93-
log_printf("Allocated %u bytes for CANopen objects\n", heapMemoryUsed);
93+
log_printf("Allocated %lu bytes for CANopen objects\n", heapMemoryUsed);
9494
}
9595

9696
canopenNodeSTM32->canOpenStack = CO;
@@ -101,7 +101,7 @@ canopen_app_init(CANopenNodeSTM32* _canopenNodeSTM32) {
101101
&storageInitError);
102102

103103
if (err != CO_ERROR_NO && err != CO_ERROR_DATA_CORRUPT) {
104-
log_printf("Error: Storage %d\n", storageInitError);
104+
log_printf("Error: Storage %lu\n", storageInitError);
105105
return 2;
106106
}
107107
#endif
@@ -155,7 +155,7 @@ canopen_app_resetCommunication() {
155155
canopenNodeSTM32->activeNodeID, &errInfo);
156156
if (err != CO_ERROR_NO && err != CO_ERROR_NODE_ID_UNCONFIGURED_LSS) {
157157
if (err == CO_ERROR_OD_PARAMETERS) {
158-
log_printf("Error: Object Dictionary entry 0x%X\n", errInfo);
158+
log_printf("Error: Object Dictionary entry 0x%lX\n", errInfo);
159159
} else {
160160
log_printf("Error: CANopen initialization failed: %d\n", err);
161161
}
@@ -165,7 +165,7 @@ canopen_app_resetCommunication() {
165165
err = CO_CANopenInitPDO(CO, CO->em, OD, canopenNodeSTM32->activeNodeID, &errInfo);
166166
if (err != CO_ERROR_NO) {
167167
if (err == CO_ERROR_OD_PARAMETERS) {
168-
log_printf("Error: Object Dictionary entry 0x%X\n", errInfo);
168+
log_printf("Error: Object Dictionary entry 0x%lX\n", errInfo);
169169
} else {
170170
log_printf("Error: PDO initialization failed: %d\n", err);
171171
}

0 commit comments

Comments
 (0)