get rid of (most) compiler warnings

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@733 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Arnim Läuger 17 years ago
parent fb8a7b3831
commit bd53788ad9

@ -37,8 +37,7 @@
static int
cmd_debug_run( char *params[] )
{
int data,i;
signal_t *s;
unsigned int i;
if (cmd_params( params ) != 2)
return -1;

@ -37,7 +37,7 @@ static int
cmd_eraseflash_run( char *params[] )
{
uint32_t adr = 0;
int number = 0;
unsigned int number = 0;
if (cmd_params( params ) != 3)
return -1;

@ -35,7 +35,7 @@ static int
cmd_peek_run( char *params[] )
{
uint32_t adr, val;
int pars, j = 1, bw;
int pars, j = 1;
bus_area_t area;
/* bus_t * bus = part_get_active_bus(chain); */

@ -33,9 +33,8 @@
static int
cmd_script_run( char *params[] )
{
int i,j;
int go;
int i, j;
int go = 0;
i = 0; j = 1;
if (cmd_params( params ) == 3) {
sscanf(params[2],"%d",&j); /* loop n times option */
@ -43,11 +42,12 @@ int i,j;
else if (cmd_params( params ) != 2)
return -1;
for(i=0;i<j;i++) {
for(i = 0; i < j ;i++) {
go = jtag_parse_file( params[1] );
if (go < 0) {
if(go != -99)printf( _("Unable to open file `%s go=%s'!\n"), params[1], go );
if (go != -99)
printf( _("Unable to open file `%s go=%d'!\n"), params[1], go );
break;
}
}

@ -25,7 +25,7 @@
#include "sysdep.h"
//#include <stdio.h>
//#include <string.h>
#include <string.h>
#include <stdlib.h>
//#include "part.h"
//#include "bssignal.h"

@ -59,7 +59,7 @@ cmd_signal_run( char *params[] )
part = chain->parts->parts[chain->active_part];
if ((s = part_find_signal( part, params[1] )) != NULL) {
if(i == 3) {
printf("Defining pin for signal %s\m",s->name);
printf("Defining pin for signal %s\n",s->name);
if(s->pin)free(s->pin); /* erase old */

@ -37,7 +37,8 @@
static int
cmd_test_run( char *params[] )
{
int data,i;
int data;
unsigned int i;
signal_t *s;
if (cmd_params( params ) != 4)

@ -160,15 +160,15 @@ find_record( char *filename, tap_register *key, struct id_record *idr )
return r;
}
unsigned long bits_to_long(tap_register *t) {
int i;
unsigned long l,b;
uint64_t bits_to_uint64(tap_register *t)
{
int i;
uint64_t l,b;
l = 0; b=1;
for(i=0;i < t->len ;i++) {
if(t->data[i] & 1)l |= b;
b <<= 1;
// printf("%01d",t->data[i]);
}
return l;
}
@ -260,7 +260,7 @@ detect_parts( chain_t *chain, char *db_path )
did = id;
}
printf( _("Device Id: %s (0x%08X)\n"), register_get_string( did ), bits_to_long(did) );
printf( _("Device Id: %s (0x%016lX)\n"), register_get_string( did ), bits_to_uint64(did) );
part = part_alloc( did );
if (part == NULL) {
printf( _("Out of memory\n") );

@ -230,7 +230,7 @@ jtag_parse_stream( FILE *f )
{
int go = 1;
char *line = NULL;
int n = 0;
size_t n = 0;
while (go && (getline( &line, &n, f ) != -1))
if ((strlen(line) > 0) && (line[0] != '#'))

@ -69,7 +69,7 @@ salias_alloc( const char *name, const signal_t *signal )
return NULL;
}
sa->next = NULL;
sa->signal = signal;
sa->signal = (signal_t *)signal;
return sa;
}

@ -44,7 +44,7 @@ void
readmem( bus_t *bus, FILE *f, uint32_t addr, uint32_t len )
{
uint32_t step;
uint64_t a;
uint32_t a;
int bc = 0;
#define BSIZE 4096
uint8_t b[BSIZE];

@ -33,6 +33,10 @@
#include "svf.h"
/* interface to flex */
#include "svf_bison.h"
int yylex (YYSTYPE *, YYLTYPE *);
#define YYERROR_VERBOSE
struct svf_parser_params {

@ -87,7 +87,7 @@ COMMENT (!.*)|("//".*)[^\n]
<expect_vector>"("{WSPACE}*[\n\rHhLlZzUuDdXx \t\r]+{WSPACE}*")" {
/* There is a overlap of VECTOR_STRING and HEXA_NUM when the string
/* There is an overlap of VECTOR_STRING and HEXA_NUM when the string
contains only 'd' or 'D'. To prevent complicated parsing rules,
the lexer is instructed to detect VECTOR_STRING only when a PIO
command has been scanned previously.

@ -37,7 +37,7 @@ void
writemem( bus_t *bus, FILE *f, uint32_t addr, uint32_t len )
{
uint32_t step;
uint64_t a;
uint32_t a;
int bc = 0;
int bidx = 0;
#define BSIZE 4096

Loading…
Cancel
Save