Skip to content
Snippets Groups Projects
Commit 176c0185 authored by Johannes Obermayr's avatar Johannes Obermayr
Browse files

Fix some serious compiler warnings causing build breakage on openSUSE.

parent 9aa0f64b
No related branches found
No related tags found
No related merge requests found
...@@ -614,7 +614,7 @@ void qh_initflags(char *command) { ...@@ -614,7 +614,7 @@ void qh_initflags(char *command) {
if (command <= &qh qhull_command[0] || command > &qh qhull_command[0] + sizeof(qh qhull_command)) { if (command <= &qh qhull_command[0] || command > &qh qhull_command[0] + sizeof(qh qhull_command)) {
if (command != &qh qhull_command[0]) { if (command != &qh qhull_command[0]) {
*qh qhull_command= '\0'; *qh qhull_command= '\0';
strncat( qh qhull_command, command, sizeof( qh qhull_command)); strncat(qh qhull_command, command, sizeof(qh qhull_command)-strlen(qh qhull_command)-1);
} }
while (*s && !isspace(*s)) /* skip program name */ while (*s && !isspace(*s)) /* skip program name */
s++; s++;
......
...@@ -124,7 +124,7 @@ int qh_rboxpoints(FILE* fout, FILE* ferr, char* rbox_command) { ...@@ -124,7 +124,7 @@ int qh_rboxpoints(FILE* fout, FILE* ferr, char* rbox_command) {
} }
*command= '\0'; *command= '\0';
strncat(command, rbox_command, sizeof(command)); strncat(command, rbox_command, sizeof(command)-strlen(command)-1);
while (*s && !isspace(*s)) /* skip program name */ while (*s && !isspace(*s)) /* skip program name */
s++; s++;
...@@ -346,8 +346,8 @@ int qh_rboxpoints(FILE* fout, FILE* ferr, char* rbox_command) { ...@@ -346,8 +346,8 @@ int qh_rboxpoints(FILE* fout, FILE* ferr, char* rbox_command) {
} }
}else if (israndom) { }else if (israndom) {
seed= (int)time(&timedata); seed= (int)time(&timedata);
sprintf(seedbuf, " t%d", seed); /* appends an extra t, not worth removing */ printf(seedbuf, " t%d", seed); /* appends an extra t, not worth removing */
strncat(command, seedbuf, sizeof(command)); strncat(command, seedbuf, sizeof(command)-strlen(command)-1);
t= strstr(command, " t "); t= strstr(command, " t ");
if (t) if (t)
strcpy(t+1, t+3); /* remove " t " */ strcpy(t+1, t+3); /* remove " t " */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment