Hi Rich
Not fixed.
#!/bin/sh :: Tiny Core 7.2 :: Linux 4.2.9-tinycore
19:55:05 tc@box:/tmp/findshares-v1.08/$ > ./compilefindshares
In file included from packetdata.h:10:0,
from findshares.c:67:
netrshareenum.h:47:31: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
.bytecount=10, .Filename[0]="\\srvsvc" };
^
netrshareenum.h:47:31: note: (near initialization for ‘NTcreate.Filename[0]’)
netrshareenum.h:47:31: error: initializer element is not computable at load time
netrshareenum.h:47:31: note: (near initialization for ‘NTcreate.Filename[0]’)
In file included from findshares.c:67:0:
packetdata.h:63:14: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
.string[0]="NT LM 0.12" };
^
packetdata.h:63:14: note: (near initialization for ‘protocol.string[0]’)
packetdata.h:63:14: error: initializer element is not computable at load time
packetdata.h:63:14: note: (near initialization for ‘protocol.string[0]’)
packetdata.h:102:61: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
.ansipasswordlen=1, .capabilities=0x00000203, .strings[0]="Guest" };
^
packetdata.h:102:61: note: (near initialization for ‘setup.strings[0]’)
packetdata.h:102:61: error: initializer element is not computable at load time
packetdata.h:102:61: note: (near initialization for ‘setup.strings[0]’)
packetdata.h:134:65: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
.AndXCommand=0xFF, .passwordlen=1, .bytecount=32, .strings[0]="\\\\" };
^
packetdata.h:134:65: note: (near initialization for ‘treeconn.strings[0]’)
packetdata.h:134:65: error: initializer element is not computable at load time
packetdata.h:134:65: note: (near initialization for ‘treeconn.strings[0]’)
findshares.c: In function ‘EnumShares’:
findshares.c:464:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
setup.sessionkey=*(uint64_t*)&rxbuffer[52];
^
findshares.c:491:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
treeconn.uid=*(uint16_t*)&rxbuffer[32];
^
findshares.c:507:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
NTcreate.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
^
findshares.c:509:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
NTcreate.uid=*(uint16_t*)&rxbuffer[32]; // User ID
^
findshares.c:513:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
RPCbind.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
^
findshares.c:515:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
RPCbind.uid=*(uint16_t*)&rxbuffer[32]; // User ID
^
findshares.c:516:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
RPCbind.FID=*(uint16_t*)&rxbuffer[42]; // File ID
^
findshares.c:522:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
NetrShareEnum.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
^
findshares.c:524:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
NetrShareEnum.uid=*(uint16_t*)&rxbuffer[32]; // User ID
^
findshares.c:584:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
enumshares.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
^
findshares.c:586:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
enumshares.uid=*(uint16_t*)&rxbuffer[32]; // User ID
^
findshares.c:619:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
netservergetinfo.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
^
findshares.c:621:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
netservergetinfo.uid=*(uint16_t*)&rxbuffer[32]; // User ID
^
findshares.c:632:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
enumservers2.tid=*(uint16_t*)&rxbuffer[28]; // Tree ID
^
findshares.c:634:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
enumservers2.uid=*(uint16_t*)&rxbuffer[32]; // User ID
^
findshares.c: At top level:
findshares.c:948:13: warning: ‘Hexdump’ defined but not used [-Wunused-function]
static void Hexdump(void *src, int len)
^
text data bss dec hex filename
10947 1656 84 12687 318f findshares
-rwxr-xr-x 1 tc staff 15200 Jul 22 19:55 findshares
19:55:07 tc@box:/tmp/findshares-v1.08/$ > ./findshares
findshares version 1.08 Jul 22, 2016
Copyright Richard A. Rost April 23, 2011
Local Host Name = box
19:55:11 tc@box:/tmp/findshares-v1.08/$ > sudo killall pppd
19:55:15 tc@box:/tmp/findshares-v1.08/$ > ./findshares
findshares version 1.08 Jul 22, 2016
Copyright Richard A. Rost April 23, 2011
Local Host Name = box
Local IP Address = 192.168.0.1 on eth0
Scanning from 192.168.0.1 on eth0
Samba/Windows Shares
--------------------------------------------------------------------------------
WORKGROUP
BOX 192.168.0.1 Samba Server
IPC$ IPC Service (Samba Server)