/in/ex1.c: In function 'main':
/in/ex1.c:20:19: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
while ((ch1 = getchar()) && ch1!= '\n') {
^~~~~~~
/in/ex1.c:24:23: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
while ((ch2 = getchar()) && ch2 != ' ' && ch2 != '\n' && ch2 != '.') {}
^~~~~~~
/in/ex1.c:25:23: error: conversion to 'char' from 'int' may alter its value [-Werror=conversion]
while ((ch2 = getchar()) && ch2 != ' ' && ch2 != '\n') {
^~~~~~~
/in/ex1.c:36:24: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Werror=int-conversion]
if (strcmp(*ptr,*cpp)) {
^
In file included from /in/ex1.c:6:0:
/usr/include/string.h:136:12: note: expected 'const char *' but argument is of type 'char'
extern int strcmp (const char *__s1, const char *__s2)
^~~~~~
/in/ex1.c:36:29: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Werror=int-conversion]
if (strcmp(*ptr,*cpp)) {
^
In file included from /in/ex1.c:6:0:
/usr/include/string.h:136:12: note: expected 'const char *' but argument is of type 'char'
extern int strcmp (const char *__s1, const char *__s2)
^~~~~~
/in/ex1.c:39:24: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Werror=int-conversion]
if (strcmp(*ptr,*doc)) {
^
In file included from /in/ex1.c:6:0:
/usr/include/string.h:136:12: note: expected 'const char *' but argument is of type 'char'
extern int strcmp (const char *__s1, const char *__s2)
^~~~~~
/in/ex1.c:39:29: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Werror=int-conversion]
if (strcmp(*ptr,*doc)) {
^
In file included from /in/ex1.c:6:0:
/usr/include/string.h:136:12: note: expected 'const char *' but argument is of type 'char'
extern int strcmp (const char *__s1, const char *__s2)
^~~~~~
/in/ex1.c:41:25: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Werror=int-conversion]
}if (strcmp(*ptr,*pptx)) {
^
In file included from /in/ex1.c:6:0:
/usr/include/string.h:136:12: note: expected 'const char *' but argument is of type 'char'
extern int strcmp (const char *__s1, const char *__s2)
^~~~~~
/in/ex1.c:41:30: error: passing argument 2 of 'strcmp' makes pointer from integer without a cast [-Werror=int-conversion]
}if (strcmp(*ptr,*pptx)) {
^
In file included from /in/ex1.c:6:0:
/usr/include/string.h:136:12: note: expected 'const char *' but argument is of type 'char'
extern int strcmp (const char *__s1, const char *__s2)
^~~~~~
/in/ex1.c:14:9: error: unused variable 'length' [-Werror=unused-variable]
int length = 0;
^~~~~~
/in/ex1.c:30:14: error: 'ptr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
*ptr = arr[0];
~~~~~^~~~~~~~
cc1: all warnings being treated as errors