You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pine64-pinephone:~/pine_gestures$ make
g++ -std=c++11 -o pine_gestures pine_gestures.cpp
In file included from /usr/include/c++/12.2.1/cstring:42,
from pine_gestures.cpp:22:
pine_gestures.cpp: In function 'int ftoi(char*)':
pine_gestures.cpp:54:24: error: cannot convert 'std::nullptr_t' to 'int' in return
54 | return NULL;
| ^~~~
pine_gestures.cpp:59:24: error: cannot convert 'std::nullptr_t' to 'int' in return
59 | return NULL;
| ^~~~
pine_gestures.cpp: In function 'int get_arg(int, char**, char*, char*)':
pine_gestures.cpp:179:20: warning: format not a string literal and no format arguments [-Wformat-security]
179 | sprintf(arg_value, argv[i+1]);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
pine_gestures.cpp: In function 'void usage(char*)':
pine_gestures.cpp:191:21: warning: format '%s' expects a matching 'char*' argument [-Wformat=]
191 | printf("Usage: %s [--shake_cmd ] [--twist_cmd ]\n");
| ~^
| |
| char*
pine_gestures.cpp: In function 'int main(int, char**)':
pine_gestures.cpp:204:35: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
204 | int ret = get_arg(argc, argv, "--shake_cmd", shake_command);
| ^~~~~~~~~~~~~
pine_gestures.cpp:213:31: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
213 | ret = get_arg(argc, argv, "--twist_cmd", twist_command);
| ^~~~~~~~~~~~~
pine_gestures.cpp:233:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
233 | if(find("/sys/bus/i2c/drivers/inv-mpu6050-i2c", "0068", IMU_path))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pine_gestures.cpp:233:53: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
233 | if(find("/sys/bus/i2c/drivers/inv-mpu6050-i2c", "0068", IMU_path))
| ^~~~~~
pine_gestures.cpp:235:28: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
235 | if(!find(IMU_path, "iio:device", IMU_path))
| ^~~~~~~~~~~~
pine_gestures.cpp:292:20: warning: format not a string literal and no format arguments [-Wformat-security]
292 | printf(shake_command);
| ^~~~~~~~~~~~~
pine_gestures.cpp:306:20: warning: format not a string literal and no format arguments [-Wformat-security]
306 | printf(twist_command);
| ^~~~~~~~~~~~~
pine_gestures.cpp: In function 'bool find(char*, char*, char*)':
pine_gestures.cpp:87:1: warning: control reaches end of non-void function [-Wreturn-type]
87 | }
| ^
make: *** [Makefile:31: pine_gestures] Error 1
The text was updated successfully, but these errors were encountered:
pine64-pinephone:~/pine_gestures$ make
g++ -std=c++11 -o pine_gestures pine_gestures.cpp
In file included from /usr/include/c++/12.2.1/cstring:42,
from pine_gestures.cpp:22:
pine_gestures.cpp: In function 'int ftoi(char*)':
pine_gestures.cpp:54:24: error: cannot convert 'std::nullptr_t' to 'int' in return
54 | return NULL;
| ^~~~
pine_gestures.cpp:59:24: error: cannot convert 'std::nullptr_t' to 'int' in return
59 | return NULL;
| ^~~~
pine_gestures.cpp: In function 'int get_arg(int, char**, char*, char*)':
pine_gestures.cpp:179:20: warning: format not a string literal and no format arguments [-Wformat-security]
179 | sprintf(arg_value, argv[i+1]);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
pine_gestures.cpp: In function 'void usage(char*)':
pine_gestures.cpp:191:21: warning: format '%s' expects a matching 'char*' argument [-Wformat=]
191 | printf("Usage: %s [--shake_cmd ] [--twist_cmd ]\n");
| ~^
| |
| char*
pine_gestures.cpp: In function 'int main(int, char**)':
pine_gestures.cpp:204:35: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
204 | int ret = get_arg(argc, argv, "--shake_cmd", shake_command);
| ^~~~~~~~~~~~~
pine_gestures.cpp:213:31: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
213 | ret = get_arg(argc, argv, "--twist_cmd", twist_command);
| ^~~~~~~~~~~~~
pine_gestures.cpp:233:13: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
233 | if(find("/sys/bus/i2c/drivers/inv-mpu6050-i2c", "0068", IMU_path))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pine_gestures.cpp:233:53: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
233 | if(find("/sys/bus/i2c/drivers/inv-mpu6050-i2c", "0068", IMU_path))
| ^~~~~~
pine_gestures.cpp:235:28: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
235 | if(!find(IMU_path, "iio:device", IMU_path))
| ^~~~~~~~~~~~
pine_gestures.cpp:292:20: warning: format not a string literal and no format arguments [-Wformat-security]
292 | printf(shake_command);
| ^~~~~~~~~~~~~
pine_gestures.cpp:306:20: warning: format not a string literal and no format arguments [-Wformat-security]
306 | printf(twist_command);
| ^~~~~~~~~~~~~
pine_gestures.cpp: In function 'bool find(char*, char*, char*)':
pine_gestures.cpp:87:1: warning: control reaches end of non-void function [-Wreturn-type]
87 | }
| ^
make: *** [Makefile:31: pine_gestures] Error 1
The text was updated successfully, but these errors were encountered: