$ gcc -Wall -Wextra -pedantic -std=c99 -O2 polynomialring.c -o ../build/polynomialring
polynomialring.c: In function ‘multiplyPolynomials’:
polynomialring.c:100:13: warning: implicit declaration of function ‘addTerm’ [-Wimplicit-function-declaration]
addTerm(result, &term);
^~~
polynomialring.c: At top level:
polynomialring.c:107:6: warning: conflicting types for ‘addTerm’
void addTerm(Polynomial poly, Term term) {
^~~
polynomialring.c:100:13: note: previous implicit declaration of ‘addTerm’ was here
addTerm(result, &term);
^~~
polynomialring.c: In function ‘addTerm’:
polynomialring.c:113:5: warning: implicit declaration of function ‘memmove’ [-Wimplicit-function-declaration]
memmove(&poly->terms[index+1], &poly->terms[index], (poly->degree-index)*sizeof(Term));
^~~
polynomialring.c:113:5: warning: incompatible implicit declaration of built-in function ‘memmove’
polynomialring.c:113:5: note: include ‘’ or provide a declaration of ‘memmove’
polynomialring.c:9:1:
+#include
polynomialring.c:113:5:
memmove(&poly->terms[index+1], &poly->terms[index], (poly->degree-index)sizeof(Term));
^~~
polynomialring.c: In function ‘main’:
polynomialring.c:145:18: warning: passing argument 1 of ‘freePolynomial’ from incompatible pointer type [-Wincompatible-pointer-types]
freePolynomial(&sum);
^~~~
polynomialring.c:45:33: note: expected ‘Polynomial ’ {aka ‘struct Polynomial ’} but argument is of type ‘Polynomial ’ {aka ‘struct Polynomial ’}
void freePolynomial(Polynomial poly) {
polynomialring.c:157:18: warning: passing argument 1 of ‘freePolynomial’ from incompatible pointer type [-Wincompatible-pointer-types]
freePolynomial(&product);
^~~~~~~~
polynomialring.c:45:33: note: expected ‘Polynomial *’ {aka ‘struct Polynomial *’} but argument is of type ‘Polynomial **’ {aka ‘struct Polynomial **’}
void freePolynomial(Polynomial *poly) {
~~~~~~~~~~~~^~~~
polynomialring.c:160:17: warning: passing argument 1 of ‘freePolynomial’ from incompatible pointer type [-Wincompatible-pointer-types]
freePolynomial(&poly1);
^~~~~~
polynomialring.c:45:33: note: expected ‘Polynomial *’ {aka ‘struct Polynomial *’} but argument is of type ‘Polynomial **’ {aka ‘struct Polynomial **’}
void freePolynomial(Polynomial *poly) {
~~~~~~~~~~~~^~~~
polynomialring.c:161:17: warning: passing argument 1 of ‘freePolynomial’ from incompatible pointer type [-Wincompatible-pointer-types]
freePolynomial(&poly2);
^~~~~~
polynomialring.c:45:33: note: expected ‘Polynomial *’ {aka ‘struct Polynomial *’} but argument is of type ‘Polynomial **’ {aka ‘struct Polynomial **’}
void freePolynomial(Polynomial *poly) {
~~~~~~~~~~~~^~~~
$ gcc -Wall -Wextra -pedantic -std=c99 -O2 polynomialring.c -o ../build/polynomialring polynomialring.c: In function ‘multiplyPolynomials’: polynomialring.c:100:13: warning: implicit declaration of function ‘addTerm’ [-Wimplicit-function-declaration] addTerm(result, &term); ^’ or provide a declaration of ‘memmove’
polynomialring.c:9:1:
+#include
~~ polynomialring.c: At top level: polynomialring.c:107:6: warning: conflicting types for ‘addTerm’ void addTerm(Polynomial poly, Term term) { ^~~ polynomialring.c:100:13: note: previous implicit declaration of ‘addTerm’ was here addTerm(result, &term); ^~~ polynomialring.c: In function ‘addTerm’: polynomialring.c:113:5: warning: implicit declaration of function ‘memmove’ [-Wimplicit-function-declaration] memmove(&poly->terms[index+1], &poly->terms[index], (poly->degree-index)*sizeof(Term)); ^~~ polynomialring.c:113:5: warning: incompatible implicit declaration of built-in function ‘memmove’ polynomialring.c:113:5: note: include ‘polynomialring.c:113:5: memmove(&poly->terms[index+1], &poly->terms[index], (poly->degree-index)sizeof(Term)); ^
~~ polynomialring.c: In function ‘main’: polynomialring.c:145:18: warning: passing argument 1 of ‘freePolynomial’ from incompatible pointer type [-Wincompatible-pointer-types] freePolynomial(&sum); ^~~~ polynomialring.c:45:33: note: expected ‘Polynomial ’ {aka ‘struct Polynomial ’} but argument is of type ‘Polynomial ’ {aka ‘struct Polynomial ’} void freePolynomial(Polynomial poly) {