Enable -Wmissing-prototypes

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1514 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Rutger Hofman 16 years ago
parent c42619d1e6
commit 1c1fa836b9

@ -264,7 +264,7 @@ AS_IF([test "x$with_inpout32" = xyes], [
])
CFLAGS="$CFLAGS -Wall"
CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wstrict-prototypes"
CPPFLAGS="-I\$(top_srcdir) -I\$(top_srcdir)/include $CPPFLAGS"

@ -28,15 +28,23 @@
#ifdef __cplusplus
extern "C"
{
#endif
# ifndef CVOID
# define CVOID
# endif
#else /* def __cplusplus */
# ifndef CVOID
# define CVOID void
# endif
#endif /* def __cplusplus */
/* return real time in seconds starting at some arbitrary point in
time*/
long double frealtime ();
long double frealtime (CVOID);
/* return the CPU time used by this process (seconds) */
long double fcputime ();
long double fcputime (CVOID);
#ifdef __cplusplus

@ -362,7 +362,7 @@ ejtag_dma_read (unsigned int addr, int sz)
* bus->driver->(*initbus)
*
*/
int
static int
ejtag_dma_bus_init (bus_t *bus)
{
data_register *ejctrl = NULL, *ejimpl = NULL, *ejaddr = NULL, *ejdata =
@ -516,7 +516,7 @@ ejtag_dma_bus_init (bus_t *bus)
* bus->driver->(*prepare)
*
*/
void
static void
ejtag_dma_bus_prepare (bus_t *bus)
{
if (!INITIALIZED)
@ -527,7 +527,7 @@ ejtag_dma_bus_prepare (bus_t *bus)
* bus->driver->(*area)
*
*/
int
static int
ejtag_dma_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area)
{
@ -584,7 +584,7 @@ ejtag_dma_bus_area (bus_t *bus, uint32_t adr, bus_area_t *area)
return URJTAG_STATUS_OK;
}
int
static int
get_sz (uint32_t adr)
{
static bus_area_t area;
@ -611,7 +611,7 @@ get_sz (uint32_t adr)
* bus->driver->(*write)
*
*/
void
static void
ejtag_dma_bus_write (bus_t *bus, uint32_t adr, uint32_t data)
{
//printf("%s:adr=0x%x,data=0x%x\n",__FUNCTION__,adr,data);
@ -622,7 +622,7 @@ ejtag_dma_bus_write (bus_t *bus, uint32_t adr, uint32_t data)
* bus->driver->(*read)
*
*/
unsigned int
static unsigned int
ejtag_dma_bus_read (bus_t *bus, uint32_t adr)
{
int data = ejtag_dma_read (adr, get_sz (adr));
@ -635,7 +635,7 @@ static unsigned int _data_read;
* bus->driver->(*read_start)
*
*/
void
static void
ejtag_dma_bus_read_start (bus_t *bus, uint32_t adr)
{
_data_read = ejtag_dma_read (adr, get_sz (adr));
@ -647,7 +647,7 @@ ejtag_dma_bus_read_start (bus_t *bus, uint32_t adr)
* bus->driver->(*read_next)
*
*/
unsigned int
static unsigned int
ejtag_dma_bus_read_next (bus_t *bus, uint32_t adr)
{
unsigned int tmp_value = _data_read;
@ -660,7 +660,7 @@ ejtag_dma_bus_read_next (bus_t *bus, uint32_t adr)
* bus->driver->(*read_end)
*
*/
unsigned int
static unsigned int
ejtag_dma_bus_read_end (bus_t *bus)
{
return _data_read;

@ -39,13 +39,9 @@
#include <flash.h>
#include <bus.h>
cfi_array_t *cfi_array = NULL;
extern int jedec_exp_detect (bus_t *bus, uint32_t adr,
cfi_array_t **cfi_array);
extern int jedec_detect (bus_t *bus, uint32_t adr, cfi_array_t **cfi_array);
#include "jedec.h"
extern int amd_detect (bus_t *bus, uint32_t adr, cfi_array_t **cfi_array); //Ajith
cfi_array_t *cfi_array = NULL;
void
detectflash (bus_t *bus, uint32_t adr)

@ -34,6 +34,8 @@
#include <flash.h>
#include <bus.h>
#include "jedec.h"
/* Manufacturers */
#define MANUFACTURER_AMD 0x0001
#define MANUFACTURER_ATMEL 0x001F

@ -0,0 +1,37 @@
/*
* $Id: jedec.h 1510 2009-04-21 17:29:52Z rfhh $
*
* Copyright (C) 2003 Matan Ziv-Av
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* Written by Matan Ziv-Av, 2003.
*
*/
#ifndef URJ_SRC_FLASH_JEDEC_H
#define URJ_SRC_FLASH_JEDEC_H
#include <bus_driver.h>
#include <flash.h>
int jedec_detect (bus_t *bus, uint32_t adr, cfi_array_t **cfi_array);
#ifdef JEDEC_EXP
int jedec_exp_detect (bus_t *bus, uint32_t adr, cfi_array_t **cfi_array);
#endif
int amd_detect (bus_t *bus, uint32_t adr, cfi_array_t **cfi_array);
#endif /* ndef URJ_SRC_FLASH_JEDEC_H */

@ -39,8 +39,10 @@
#include <sys/types.h>
#include <sys/time.h>
#include "fclock.h"
long double
frealtime ()
frealtime (void)
{
long double result;
static uint64_t start_mat;
@ -73,7 +75,7 @@ frealtime ()
#ifdef _POSIX_TIMERS
long double
frealtime ()
frealtime (void)
{
long double result;
@ -100,7 +102,7 @@ frealtime ()
#include <sys/timeb.h>
long double
frealtime ()
frealtime (void)
{
long double result;
@ -137,7 +139,7 @@ set_clk_tck (void)
#endif
long double
frealtime ()
frealtime (void)
{
long double result;

@ -45,6 +45,13 @@
#include <tap.h>
#include <tap_state.h>
#if 0
#include <urjtag/svf.h> /* two include files w/ the same name
* this will be resolved when we will have
* include/urjtag/svf.h
* RFHH */
#endif
#include <cmd.h>
#include "svf.h"

@ -52,6 +52,7 @@ static void fix_yylloc(YYLTYPE *, char *);
static void fix_yylloc_nl(YYLTYPE *, char *, YY_EXTRA_TYPE);
static void progress_nl(YYLTYPE *, YY_EXTRA_TYPE);
int yywrap(yyscan_t scanner);
int yywrap(yyscan_t scanner)
{
return(1);

@ -49,7 +49,7 @@
#undef VERBOSE
#ifdef VERBOSE
void
static void
print_vector (int len, char *vec)
{
int i;
@ -91,7 +91,7 @@ generic_get_signal (cable_t *cable, pod_sigsel_t sig)
return (((PARAM_SIGNALS (cable)) & sig) != 0) ? 1 : 0;
}
int
static int
do_one_queued_action (cable_t *cable)
{
int i;

@ -39,7 +39,7 @@
#undef VERBOSE
#ifdef VERBOSE
void
static void
print_vector (int len, char *vec)
{
int i;

@ -519,7 +519,7 @@ jlink_get_tdo (cable_t *cable)
/* ---------------------------------------------------------------------- */
void
static void
jlink_copy_out_data (jlink_usbconn_data_t *data, int len, int offset,
char *buf)
{
@ -532,7 +532,7 @@ jlink_copy_out_data (jlink_usbconn_data_t *data, int len, int offset,
}
}
int
static int
jlink_transfer (cable_t *cable, int len, char *in, char *out)
{
int i, j;

@ -96,7 +96,7 @@ usbblaster_connect (char *params[], cable_t *cable)
return 0;
}
void
static void
usbblaster_set_frequency (cable_t *cable, uint32_t new_frequency)
{
if (new_frequency != FIXED_FREQUENCY)
@ -474,7 +474,7 @@ usbblaster_flush (cable_t *cable, cable_flush_amount_t how_much)
}
}
void
static void
usbblaster_help (const char *cablename)
{
printf (_

@ -75,7 +75,7 @@ static int last_tdo;
/* ---------------------------------------------------------------------- */
int
static int
xpcu_output_enable (struct usb_dev_handle *xpcu, int enable)
{
if (usb_control_msg
@ -90,7 +90,8 @@ xpcu_output_enable (struct usb_dev_handle *xpcu, int enable)
/* ---------------------------------------------------------------------- */
int
#ifdef UNUSED /* RFHH */
static int
xpcu_bit_reverse (struct usb_dev_handle *xpcu, uint8_t bits_in,
uint8_t *bits_out)
{
@ -103,10 +104,11 @@ xpcu_bit_reverse (struct usb_dev_handle *xpcu, uint8_t bits_in,
return 0;
}
#endif
/* ----------------------------------------------------------------- */
int
static int
xpcu_request_28 (struct usb_dev_handle *xpcu, int value)
{
/* Typical values seen during autodetection of chain configuration: 0x11, 0x12 */
@ -122,7 +124,7 @@ xpcu_request_28 (struct usb_dev_handle *xpcu, int value)
/* ---------------------------------------------------------------------- */
int
static int
xpcu_write_gpio (struct usb_dev_handle *xpcu, uint8_t bits)
{
if (usb_control_msg (xpcu, 0x40, 0xB0, 0x0030, bits, NULL, 0, 1000) < 0)
@ -136,7 +138,7 @@ xpcu_write_gpio (struct usb_dev_handle *xpcu, uint8_t bits)
/* ---------------------------------------------------------------------- */
int
static int
xpcu_read_gpio (struct usb_dev_handle *xpcu, uint8_t *bits)
{
if (usb_control_msg (xpcu, 0xC0, 0xB0, 0x0038, 0, (char *) bits, 1, 1000)
@ -152,7 +154,7 @@ xpcu_read_gpio (struct usb_dev_handle *xpcu, uint8_t *bits)
/* ---------------------------------------------------------------------- */
int
static int
xpcu_read_cpld_version (struct usb_dev_handle *xpcu, uint16_t *buf)
{
if (usb_control_msg
@ -166,7 +168,7 @@ xpcu_read_cpld_version (struct usb_dev_handle *xpcu, uint16_t *buf)
/* ---------------------------------------------------------------------- */
int
static int
xpcu_read_firmware_version (struct usb_dev_handle *xpcu, uint16_t *buf)
{
if (usb_control_msg
@ -181,7 +183,7 @@ xpcu_read_firmware_version (struct usb_dev_handle *xpcu, uint16_t *buf)
/* ----------------------------------------------------------------- */
int
static int
xpcu_select_gpio (struct usb_dev_handle *xpcu, int int_or_ext)
{
if (usb_control_msg (xpcu, 0x40, 0xB0, 0x0052, int_or_ext, NULL, 0, 1000)

@ -167,7 +167,7 @@ find_record (char *filename, tap_register *key, struct id_record *idr)
return r;
}
uint64_t
static uint64_t
bits_to_uint64 (tap_register *t)
{
int i;

@ -119,7 +119,7 @@ detect_register_size (chain_t *chain)
return -1;
}
void
static void
jtag_reset (chain_t *chain)
{
chain_set_trst (chain, 0);

@ -198,7 +198,7 @@ direct_parport_free (parport_t *port)
#endif
}
parport_t *
static parport_t *
direct_connect (const char **par, int parnum)
{
long int port_scan_val;

@ -113,7 +113,7 @@ ppdev_parport_free (parport_t *port)
free (port);
}
parport_t *
static parport_t *
ppdev_connect (const char **par, int parnum)
{
port_node_t *pn;

@ -271,7 +271,7 @@ usbconn_ftd2xx_write (usbconn_t *conn, uint8_t *buf, int len, int recv)
/* ---------------------------------------------------------------------- */
usbconn_t *
static usbconn_t *
usbconn_ftd2xx_connect (const char **param, int paramc,
usbconn_cable_t *template)
{
@ -329,7 +329,7 @@ usbconn_ftd2xx_connect (const char **param, int paramc,
}
usbconn_t *
static usbconn_t *
usbconn_ftd2xx_mpsse_connect (const char **param, int paramc,
usbconn_cable_t *template)
{

@ -234,7 +234,7 @@ usbconn_ftdi_write (usbconn_t *conn, uint8_t *buf, int len, int recv)
/* ---------------------------------------------------------------------- */
usbconn_t *
static usbconn_t *
usbconn_ftdi_connect (const char **param, int paramc,
usbconn_cable_t *template)
{
@ -296,7 +296,7 @@ usbconn_ftdi_connect (const char **param, int paramc,
}
usbconn_t *
static usbconn_t *
usbconn_ftdi_mpsse_connect (const char **param, int paramc,
usbconn_cable_t *template)
{

@ -109,7 +109,7 @@ libusb_match_desc (struct usb_device *dev, char *desc)
/* ---------------------------------------------------------------------- */
usbconn_t *
static usbconn_t *
usbconn_libusb_connect (const char **param, int paramc,
usbconn_cable_t *template)
{

Loading…
Cancel
Save