Address warnings from neuron hardware layer

This commit is contained in:
Garret Fick 2020-05-04 22:27:13 -04:00
parent ae24ee7523
commit 5a1411091a
No known key found for this signature in database
GPG Key ID: 0F2FA2774E86EEFF
2 changed files with 6 additions and 7 deletions

View File

@ -112,7 +112,6 @@ extern int ignored_int_inputs[];
extern int ignored_int_outputs[];
// main.cpp
void sleep_until(struct timespec *ts, int delay);
bool pinNotPresent(int *ignored_vector, int vector_size, int pinNumber);
extern uint8_t run_openplc;

View File

@ -50,7 +50,7 @@ char analog_outputs[1000][200];
//-----------------------------------------------------------------------------
// This function is responsible for making I/O requests using SYSFS
//-----------------------------------------------------------------------------
int requestSYSFS(char *path, char *command)
int requestSYSFS(char *path, const char *command)
{
int fd, len;
char buf[100];
@ -114,7 +114,7 @@ void searchForIO()
for (int minor = 1; minor < 10; minor++)
{
sprintf(path, path_fmt, group, major, minor);
char *command = "read";
const char *command = "read";
if (requestSYSFS(path, command) >= 0)
{
/* valid I/O. Add to the list */
@ -136,7 +136,7 @@ void searchForIO()
for (int minor = 1; minor < 10; minor++)
{
sprintf(path, path_fmt, group, major, minor);
char *command = "read";
const char *command = "read";
if (requestSYSFS(path, command) >= 0)
{
/* valid I/O. Add to the list */
@ -157,7 +157,7 @@ void searchForIO()
for (int minor = 1; minor < 10; minor++)
{
sprintf(path, path_fmt, group, major, minor);
char *command = "read";
const char *command = "read";
if (requestSYSFS(path, command) >= 0)
{
/* valid I/O. Add to the list */
@ -179,7 +179,7 @@ void searchForIO()
for (int minor = 1; minor < 10; minor++)
{
sprintf(path, path_fmt, group, major, minor);
char *command = "read";
const char *command = "read";
if (requestSYSFS(path, command) >= 0)
{
/* valid I/O. Add to the list */
@ -201,7 +201,7 @@ void searchForIO()
for (int minor = 1; minor < 10; minor++)
{
sprintf(path, path_fmt, group, major, minor);
char *command = "read";
const char *command = "read";
if (requestSYSFS(path, command) >= 0)
{
/* valid I/O. Add to the list */