Closed ghost closed 11 years ago
why my issue is bold?
This issue has been fixed in modbus 3.1 and I've just pushed this commit in v3.0.X branch (4396649fe04). thank you for the report.
PS: github provides a Preview tab to check the final result of comment
When I compile libmodbus (3.0.3) my compiler (g++ 4.7.1)says:
../xline/libmodbus/src/modbus.c: In function 'modbus_set_error_recovery':
../xline/libmodbus/src/modbus.c:1406:5: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
maybe is not important....
typedef enum { MODBUS_ERROR_RECOVERY_NONE = 0, MODBUS_ERROR_RECOVERY_LINK = (1<<1), MODBUS_ERROR_RECOVERY_PROTOCOL = (1<<2),
} modbus_error_recovery_mode;
int modbus_set_error_recovery(modbus_t *ctx, modbus_error_recovery_mode error_recovery) { (1406 line-->) if (error_recovery >= 0) { ctx->error_recovery = (uint8_t) error_recovery; } else { errno = EINVAL; return -1; }
}