Browse Source

Show more warnings, and fix them.

git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@4499 7894878c-1315-0410-8ee3-d5d059ff63e0
tags/v3.0.0
Jean Delvare 18 years ago
parent
commit
7457b172b0
  1. 2
      tools/Makefile
  2. 6
      tools/i2cdetect.c
  3. 2
      tools/i2cdump.c
  4. 9
      tools/i2cget.c
  5. 4
      tools/i2cset.c

2
tools/Makefile

@ -7,7 +7,7 @@
CC = gcc
CFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \
-Wcast-align -Wwrite-strings -Wnested-externs -Winline -W \
-I../include
-Wundef -Wmissing-prototypes -I../include
CFLAGS += -O2
# When debugging, use the following instead

6
tools/i2cdetect.c

@ -33,7 +33,7 @@
#define MODE_READ 2
#define MODE_FUNC 3
void help(void)
static void help(void)
{
fprintf(stderr,
"Syntax: i2cdetect [-y] [-a] [-q|-r] I2CBUS [FIRST LAST]\n"
@ -51,7 +51,7 @@ void help(void)
print_i2c_busses(0);
}
int scan_i2c_bus(int file, const int mode, const int first, const int last)
static int scan_i2c_bus(int file, int mode, int first, int last)
{
int i, j;
int res;
@ -155,7 +155,7 @@ static const struct func all_func[] = {
{ .value = 0, .name = "" }
};
void print_functionality(unsigned long funcs)
static void print_functionality(unsigned long funcs)
{
int i;

2
tools/i2cdump.c

@ -29,7 +29,7 @@
#include <linux/i2c-dev.h>
#include "../version.h"
void help(void)
static void help(void)
{
fprintf(stderr, "Syntax: i2cdump [-f] [-y] I2CBUS ADDRESS [MODE] "
"[BANK [BANKREG]]\n"

9
tools/i2cget.c

@ -32,9 +32,9 @@
#include <linux/i2c-dev.h>
#include "../version.h"
void help(void) __attribute__ ((noreturn));
static void help(void) __attribute__ ((noreturn));
void help(void)
static void help(void)
{
fprintf(stderr, "Syntax: i2cget [-f] [-y] I2CBUS CHIP-ADDRESS "
"[DATA-ADDRESS [MODE]]\n"
@ -50,7 +50,7 @@ void help(void)
exit(1);
}
int check_funcs(int file, int i2cbus, int size, int daddress, int pec)
static int check_funcs(int file, int i2cbus, int size, int daddress, int pec)
{
unsigned long funcs;
@ -102,7 +102,8 @@ int check_funcs(int file, int i2cbus, int size, int daddress, int pec)
return 0;
}
int confirm(const char *filename, int address, int size, int daddress, int pec)
static int confirm(const char *filename, int address, int size, int daddress,
int pec)
{
int dont = 0;

4
tools/i2cset.c

@ -29,9 +29,9 @@
#include <linux/i2c-dev.h>
#include "../version.h"
void help(void) __attribute__ ((noreturn));
static void help(void) __attribute__ ((noreturn));
void help(void)
static void help(void)
{
fprintf(stderr, "Syntax: i2cset [-f] [-y] I2CBUS CHIP-ADDRESS DATA-ADDRESS "
"VALUE [MODE] [MASK]\n"

Loading…
Cancel
Save