char *filename, *cp;
struct stat statbuf;
GtkFileChooser *chooser = GTK_FILE_CHOOSER (opfile);
- char *contents;
+ char *contents = NULL;
filename = gtk_file_chooser_get_filename (chooser);
fdin =open(filename, O_RDONLY);
bytes_read = bytes_written = 0;
}
if(info) {
- g_print("getFrequencyInfo: %s tx=%d\n", info->info, info->transmit);
+ //g_print("getFrequencyInfo: %s tx=%d\n", info->info, info->transmit);
}
return result;
static enum MIDIaction keyword2action(char *s) {
int i=0;
+ // cppcheck will spot an error here. But the last string in ActionTable is NULL
+ // so the index (i) will never become out-of-bounds.
for (i=0; 1; i++) {
if (ActionTable[i].str == NULL) {
fprintf(stderr,"MIDI: action keyword %s NOT FOUND.\n", s);
static long highprio_rcvd_sequence=0;
static long micsamples_sequence=0;
-static int response;
+// This is shared with new_protocol_programmer.c
+int response;
//static sem_t send_high_priority_sem;
//static int send_high_priority=0;
/*
extern long response_sequence;
-extern int response;
*/
+// DL1YCF: "response" is global (used in new_protocol_programmer.c)
+extern int response;
extern unsigned int exciter_power;
extern unsigned int alex_forward_power;
// read the file in
int r;
int b=0;
- while((r==fread(&source[b],sizeof(char),512, fp))>0) {
+ while((r=fread(&source[b],sizeof(char),512, fp))>0) {
b+=r;
}
}
void *programmer_thread(void *arg) {
- int response;
int result;
struct timespec ts;
BAND *band=band_get_band(b);
band->alexRxAntenna = work_int;
} else {
- fprintf(stderr,"RIGCTL ZZOA illegal val Band=%d Val=%d\n",int_band,work_int);
+ fprintf(stderr,"RIGCTL ZZOA illegal val Band=%d Val=%d\n",b,work_int);
}
}
}