Missing includes in examples



Just playing with the example programs (compiling with -Wall),
and I am seeing some errors that sould be fixed to make the
examples better. (Since these are supposed to show how to use
the functions, it should be clean code)

I also think that the examples should be compiled with "-Wall"
to keep them clean. (Just change the line "CC = gcc" in the
makefiles with "CC = gcc -Wall")



In gtk+/examples/notebook/notebook.c, it is missing a
"#include <stdio.h>", because it uses sprintf.

In gtk+/examples/entry/entry.c, it is also missing a
"#include <stdio.h>, because it uses printf.

In gtk+/examples/frame/frame.c. it defines 'i' and 'button',
but never uses them.

In gtk+/examples/dial/dial.c, there is a return without
a value in a nonvoid function. (Line 347). Should this be
a "return FALSE" or a "return TRUE"?

In gtk+/examples/menu/menu.c, it is missing a
"#include <stdio.h>, because it uses printf and sprintf.

In gtk+/examples/examples/pack.c, it is missing a
"#include <stdio.h>", because it uses "printf" and "sprintf".
It also has devinitions of the variable "list" in several
functions, but never uses it.

In gtk+/examples/paned/paned.c, it is missing a
"#include <stdio.h>", because it uses sprintf.

In gtk+/examples/scrolledwin/scrolledwin.c, it is missing a
"#include <stdio.h>", because it uses sprintf.

In gtk+/examples/spinbutton/spinbutton.h, it is missing a
"#include <stdio.h>", because it uses sprintf.






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]