summaryrefslogtreecommitdiff
path: root/tests/checkfs
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2017-06-22 13:37:40 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2017-06-28 10:27:31 +0200
commitca517e8b320c7a31c3a147fb1212ddb33cabd919 (patch)
treea26d535836a82ea241dc0389b061176ddfcd8329 /tests/checkfs
parent3029b659e89caa79b6860c3bbe8cbc18b53af678 (diff)
Eliminate warnings about missing prototypes
This patch eliminates warnings generated by the -Wmissing-prototypes option. With this flag set, we are now forced to have prototypes for all global, exported functions, that have to be made visible to the definitions and we are forced to mark all local functions as static. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/checkfs')
-rw-r--r--tests/checkfs/checkfs.c14
-rw-r--r--tests/checkfs/makefiles.c4
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/checkfs/checkfs.c b/tests/checkfs/checkfs.c
index 3e4a6e2..3e34cc4 100644
--- a/tests/checkfs/checkfs.c
+++ b/tests/checkfs/checkfs.c
@@ -161,7 +161,7 @@ static const unsigned short crc_ccitt_table[] = {
Returns file descriptor to open port. Use this fd to write to port
and close it later, when done.
*/
-int setupSerial (const char *dev) {
+static int setupSerial (const char *dev) {
int i, fd;
struct termios tios;
@@ -215,7 +215,7 @@ int setupSerial (const char *dev) {
//CRC to calculate out to 0xf0b8 (the hardcoded value at the end)
//and returns TRUE if it is and FALSE if it doesn't.
//Why don't people document better!!!!
-int check_crc_ccitt(char *filename)
+static int check_crc_ccitt(char *filename)
{
FILE *fp;
FILE *logfp;
@@ -306,7 +306,7 @@ int check_crc_ccitt(char *filename)
initially (and once) created by the separate "makefiles.c"
program.
*/
-void send_pwrdn_ok(void){
+static void send_pwrdn_ok(void){
int fd;
FILE *cyclefp;
@@ -363,7 +363,7 @@ void send_pwrdn_ok(void){
Appends 16bit CRC at the end of numBytes long buffer.
Make sure buf, extends at least 2 bytes beyond.
*/
-void appendChecksum(char *buf, int numBytes){
+static void appendChecksum(char *buf, int numBytes){
unsigned short crc = 0xffff;
int index = 0;
@@ -395,7 +395,7 @@ void appendChecksum(char *buf, int numBytes){
number of int's in it (this is needed to know how much
data to read and checksum later).
*/
-void make_new_file(char *filename){
+static void make_new_file(char *filename){
int dfd; /* data file descriptor */
@@ -486,7 +486,7 @@ void make_new_file(char *filename){
/*
Show's help on stdout
*/
-void printHelp(char **argv)
+static void printHelp(char **argv)
{
printf("Usage:%s <options, defined below>\n", argv[0]);
printf("%s </dev/ttyS0,1,2...>: Set com port to send ok to pwr dn msg on\n",
@@ -502,7 +502,7 @@ void printHelp(char **argv)
-void processCmdLine(int argc, char **argv)
+static void processCmdLine(int argc, char **argv)
{
int cnt;
diff --git a/tests/checkfs/makefiles.c b/tests/checkfs/makefiles.c
index 52fea54..4f37f2e 100644
--- a/tests/checkfs/makefiles.c
+++ b/tests/checkfs/makefiles.c
@@ -79,7 +79,7 @@ static const unsigned short crc_ccitt_table[] = {
//CRC to calculate out to 0xf0b8 (the hardcoded value at the end)
//and returns TRUE if it is and FALSE if it doesn't.
//Why don't people document better!!!!
-void check_crc_ccitt(char *filename)
+static void check_crc_ccitt(char *filename)
{
FILE *fp;
unsigned short crc = 0xffff;
@@ -127,7 +127,7 @@ void check_crc_ccitt(char *filename)
contents, and then appends the checksum at the end of the file,
closes the file and returns.
*/
-void checksum(char *filename){
+static void checksum(char *filename){
FILE *fp;
unsigned short crc = 0xffff;