slackbuilds_ponce/system/a2tools/fix_warnings.diff
B. Watson 4e158b736b
system/a2tools: Fix compile warnings.
Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2023-06-03 10:38:37 +07:00

21 lines
811 B
Diff

diff -Naur a2tools/a2tools.c a2tools.patched/a2tools.c
--- a2tools/a2tools.c 2001-04-10 00:18:01.000000000 -0400
+++ a2tools.patched/a2tools.c 2023-05-31 23:25:37.538490402 -0400
@@ -541,7 +541,7 @@
void a2out (void) {
unsigned char listbuffer[256];
unsigned int hop, next_trk, next_sec, i, j;
- void (*postproc_function)(void);
+ void (*postproc_function)(void) = NULL;
if (!dir_do(dir_find_name)) quit(6,"File not found.\n");
hop = begun = 0;
next_trk=dir_entry_data[0];
@@ -817,7 +817,7 @@
/* prepare source filename by padding blanks */
i=0;
- while(i<30 && a2_name[i]) padded_name[i]=a2_name[i++] & 0x7f;
+ while(i<30 && a2_name[i]) { padded_name[i]=a2_name[i] & 0x7f; i++; }
while(i<30) padded_name[i++]=' ';
/* get VTOC and check validity */