Created
April 19, 2021 08:56
-
-
Save mosbth/18b64f771201a56d391304d660247dd3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main.c: In function ‘evaluation’: | |
main.c:59:31: warning: passing argument 1 of ‘addition’ from incompatible pointer type [-Wincompatible-pointer-types] | |
if (!secondChoice) addition(question); | |
^~~~~~~~ | |
main.c:13:20: note: expected ‘int **’ but argument is of type ‘int *’ | |
void addition(int* q[]); | |
~~~~~^~~ | |
main.c:60:43: warning: passing argument 1 of ‘subtraction’ from incompatible pointer type [-Wincompatible-pointer-types] | |
else if (secondChoice == 1) subtraction(question); | |
^~~~~~~~ | |
main.c:11:23: note: expected ‘int **’ but argument is of type ‘int *’ | |
void subtraction(int* q[]); | |
~~~~~^~~ | |
main.c:62:29: warning: passing argument 1 of ‘addition’ from incompatible pointer type [-Wincompatible-pointer-types] | |
if (x % 2 == 0) addition(question); | |
^~~~~~~~ | |
main.c:13:20: note: expected ‘int **’ but argument is of type ‘int *’ | |
void addition(int* q[]); | |
~~~~~^~~ | |
main.c:63:21: warning: passing argument 1 of ‘subtraction’ from incompatible pointer type [-Wincompatible-pointer-types] | |
else subtraction(question); | |
^~~~~~~~ | |
main.c:11:23: note: expected ‘int **’ but argument is of type ‘int *’ | |
void subtraction(int* q[]); | |
~~~~~^~~ | |
main.c:74:4: warning: implicit declaration of function ‘memcpy’ [-Wimplicit-function-declaration] | |
memcpy(results[x], question, sizeof(question)); | |
^~~~~~ | |
main.c:74:4: warning: incompatible implicit declaration of built-in function ‘memcpy’ | |
main.c:74:4: note: include ‘<string.h>’ or provide a declaration of ‘memcpy’ | |
main.c:4:1: | |
+#include <string.h> | |
main.c:74:4: | |
memcpy(results[x], question, sizeof(question)); | |
^~~~~~ | |
main.c: In function ‘addition’: | |
main.c:108:7: warning: assignment to ‘int *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] | |
q[0] = rand() % 101; | |
^ | |
main.c:109:7: warning: assignment to ‘int *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] | |
q[2] = rand() % 101; | |
^ | |
main.c:110:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] | |
q[3] = (int)q[0] + (int)q[2]; | |
^ | |
main.c:110:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] | |
q[3] = (int)q[0] + (int)q[2]; | |
^ | |
main.c:110:7: warning: assignment to ‘int *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] | |
q[3] = (int)q[0] + (int)q[2]; | |
^ | |
main.c: In function ‘subtraction’: | |
main.c:114:7: warning: assignment to ‘int *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] | |
q[1] = 1; // isSubtraction | |
^ | |
main.c:116:7: warning: assignment to ‘int *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] | |
q[0] = rand() % 101; | |
^ | |
main.c:117:7: warning: assignment to ‘int *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] | |
q[2] = rand() % 101; | |
^ | |
main.c:121:9: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] | |
q[3] = (int)q[0] - (int)q[2]; | |
^ | |
main.c:121:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] | |
q[3] = (int)q[0] - (int)q[2]; | |
^ | |
main.c:121:7: warning: assignment to ‘int *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] | |
q[3] = (int)q[0] - (int)q[2]; | |
^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment