File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 run : |
2626 mkdir build
2727 cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B build
28- cppcheck --project=build/compile_commands.json --enable=all --suppress=missingIncludeSystem --suppress=unusedFunction --inconclusive --force --std=c99 --error-exitcode=1
28+ cppcheck --project=build/compile_commands.json --enable=all --suppress=constParameterPointer --suppress= missingIncludeSystem --suppress=unusedFunction --inconclusive --force --std=c99 --error-exitcode=1
2929
3030 - name : Build CANvenient
3131 run : |
Original file line number Diff line number Diff line change @@ -97,12 +97,12 @@ struct can_frame
9797
9898#endif /* _CAN_H */
9999
100- CANVENIENT_API int can_find_interfaces (const struct can_iface * iface [], const int * count );
101- CANVENIENT_API void can_free_interfaces (const struct can_iface * iface [], const int count );
100+ CANVENIENT_API int can_find_interfaces (struct can_iface * iface [], int * count );
101+ CANVENIENT_API void can_free_interfaces (struct can_iface * iface [], int count );
102102
103103CANVENIENT_API int can_open (struct can_iface * iface );
104104CANVENIENT_API int can_open_fd (struct can_iface * iface );
105- CANVENIENT_API void can_close (const struct can_iface * iface );
105+ CANVENIENT_API void can_close (struct can_iface * iface );
106106
107107CANVENIENT_API int can_send (struct can_iface * iface , struct can_frame * frame );
108108CANVENIENT_API int can_recv (struct can_iface * iface , struct can_frame * frame );
Original file line number Diff line number Diff line change 2626#include <linux/can/raw.h>
2727#endif
2828
29- CANVENIENT_API int can_find_interfaces (const struct can_iface * iface [], const int * count )
29+ CANVENIENT_API int can_find_interfaces (struct can_iface * iface [], int * count )
3030{
3131#ifdef _WIN32
3232 u32 ch_count = 0 ;
@@ -247,7 +247,7 @@ CANVENIENT_API int can_open(struct can_iface* iface)
247247
248248#elif defined __linux__
249249
250- iface -> opened = 0 ;
250+ iface -> opened = 1 ;
251251 /* Tbd. */
252252
253253#endif
@@ -261,7 +261,7 @@ CANVENIENT_API int can_open_fd(struct can_iface* iface)
261261 return 0 ;
262262}
263263
264- CANVENIENT_API void can_close (const struct can_iface * iface )
264+ CANVENIENT_API void can_close (struct can_iface * iface )
265265{
266266 if (NULL == iface )
267267 {
You can’t perform that action at this time.
0 commit comments