Browse Source

Kill a couple of thousand warnings.

These are the easy ones. I've got a few hundred left.

Signed-off-by: Dan Cross <cross@gajendra.net>
Dan Cross 7 years ago
parent
commit
3eeb7e1217
59 changed files with 171 additions and 171 deletions
  1. 2 2
      acme/bin/source/win/dat.h
  2. 2 2
      acme/mail/src/dat.h
  3. 1 1
      acme/mail/src/mesg.c
  4. 1 1
      sys/include/acpi/acpica/acapps.h
  5. 1 1
      sys/include/oprofile.h
  6. 8 8
      sys/src/9/amd64/usbehci.h
  7. 6 6
      sys/src/9/ip/ip.h
  8. 1 1
      sys/src/9/port/devtls.c
  9. 3 3
      sys/src/9/port/portfns.h
  10. 2 2
      sys/src/9/port/portusbehci.h
  11. 1 1
      sys/src/cmd/9660srv/9660srv.c
  12. 1 1
      sys/src/cmd/9660srv/dat.h
  13. 1 1
      sys/src/cmd/acme/edit.h
  14. 1 1
      sys/src/cmd/acme/fns.h
  15. 1 1
      sys/src/cmd/acpica/acpiexec/aecommon.h
  16. 3 3
      sys/src/cmd/aquarela/smbdat.h
  17. 2 2
      sys/src/cmd/auth/as.c
  18. 2 2
      sys/src/cmd/auth/cron.c
  19. 2 2
      sys/src/cmd/aux/vga/vga.h
  20. 2 2
      sys/src/cmd/disk/mkext.c
  21. 3 3
      sys/src/cmd/dossrv/fns.h
  22. 5 5
      sys/src/cmd/fossil/9.h
  23. 3 3
      sys/src/cmd/fossil/check.c
  24. 6 6
      sys/src/cmd/fossil/dat.h
  25. 1 1
      sys/src/cmd/fossil/flchk.c
  26. 3 3
      sys/src/cmd/fossil/fs.h
  27. 2 2
      sys/src/cmd/fossil/view.c
  28. 1 1
      sys/src/cmd/gzip/gunzip.c
  29. 1 1
      sys/src/cmd/gzip/unzip.c
  30. 1 1
      sys/src/cmd/gzip/zip.c
  31. 1 1
      sys/src/cmd/ip/ftpfs/ftpfs.h
  32. 2 2
      sys/src/cmd/ip/httpd/httpsrv.h
  33. 1 1
      sys/src/cmd/ip/ipconfig/ipv6.c
  34. 1 1
      sys/src/cmd/ip/pptp.c
  35. 3 3
      sys/src/cmd/map/map.c
  36. 1 1
      sys/src/cmd/map/route.c
  37. 2 2
      sys/src/cmd/rc/rc.h
  38. 1 1
      sys/src/cmd/scuzz/scsireq.h
  39. 4 4
      sys/src/cmd/ssh1/ssh.h
  40. 4 4
      sys/src/cmd/ssh2/ssh2.h
  41. 2 2
      sys/src/cmd/vac/vac.h
  42. 3 3
      sys/src/cmd/venti/srv/fns.h
  43. 2 2
      sys/src/cmd/venti/srv/mirrorarenas.c
  44. 1 1
      sys/src/cmd/vnc/compat.h
  45. 1 1
      sys/src/cmd/webfs/fns.h
  46. 1 1
      sys/src/cmd/zenith/edit.h
  47. 1 1
      sys/src/cmd/zenith/fns.h
  48. 7 7
      sys/src/libmemdraw/draw.c
  49. 2 2
      sys/src/libmemdraw/ellipse.c
  50. 2 2
      sys/src/libmemdraw/string.c
  51. 1 1
      sys/src/libmp/port/cnfield.c
  52. 6 6
      sys/src/libndb/ndbhash.c
  53. 3 3
      sys/src/liboventi/rpc.c
  54. 1 1
      sys/src/libscribble/scribbleimpl.h
  55. 3 3
      sys/src/libsec/port/tlshand.c
  56. 36 36
      sys/src/libsec/port/x509.c
  57. 4 4
      sys/src/libstdio/vfprintf.c
  58. 5 5
      sys/src/libstdio/vfscanf.c
  59. 1 1
      sys/src/libventi/queue.h

+ 2 - 2
acme/bin/source/win/dat.h

@@ -96,8 +96,8 @@ extern	void		startpipe(void);
 extern	int		pipecommand(Window*, char*);
 extern	void		pipectl(void*);
 
-#pragma	varargck	argpos	error	1
-#pragma	varargck	argpos	ctlprint	2
+//#pragma	varargck	argpos	error	1
+//#pragma	varargck	argpos	ctlprint	2
 
 extern	Window	*win;
 extern	Channel	*fschan, *writechan;

+ 2 - 2
acme/mail/src/dat.h

@@ -155,8 +155,8 @@ extern	void		error(char*, ...);
 extern	int		tokenizec(char*, char**, int, char*);
 extern	void		execproc(void*);
 
-#pragma	varargck	argpos	error	1
-#pragma	varargck	argpos	ctlprint	2
+//#pragma	varargck	argpos	error	1
+//#pragma	varargck	argpos	ctlprint	2
 
 extern	Window	*wbox;
 extern	Message	mbox;

+ 1 - 1
acme/mail/src/mesg.c

@@ -706,7 +706,7 @@ mesgtagpost(Message *m)
 }
 
 /* need to expand selection more than default word */
-#pragma varargck argpos eval 2
+//#pragma varargck argpos eval 2
 
 int32_t
 eval(Window *w, char *s, ...)

+ 1 - 1
sys/include/acpi/acpica/acapps.h

@@ -119,7 +119,7 @@
 //#include <stdio.h>
 
 #ifdef _MSC_VER                 /* disable some level-4 warnings */
-#pragma warning(disable:4100)   /* warning C4100: unreferenced formal parameter */
+//#pragma warning(disable:4100)   /* warning C4100: unreferenced formal parameter */
 #endif
 
 /* Common info for tool signons */

+ 1 - 1
sys/include/oprofile.h

@@ -35,7 +35,7 @@
 #define IBS_FETCH_CODE			13
 #define IBS_OP_CODE			14
 
-#pragma incomplete Ureg
+//#pragma incomplete Ureg
 
 /**
  * One-time exit/cleanup for the arch.

+ 8 - 8
sys/src/9/amd64/usbehci.h

@@ -26,14 +26,14 @@ typedef struct Poll Poll;
 typedef struct Qh Qh;
 typedef struct Qtree Qtree;
 
-#pragma incomplete Ctlr;
-#pragma incomplete Ecapio;
-#pragma incomplete Edbgio;
-#pragma incomplete Eopio;
-#pragma incomplete Isoio;
-#pragma incomplete Poll;
-#pragma incomplete Qh;
-#pragma incomplete Qtree;
+//#pragma incomplete Ctlr;
+//#pragma incomplete Ecapio;
+//#pragma incomplete Edbgio;
+//#pragma incomplete Eopio;
+//#pragma incomplete Isoio;
+//#pragma incomplete Poll;
+//#pragma incomplete Qh;
+//#pragma incomplete Qtree;
 
 /*
  * EHCI interface registers and bits

+ 6 - 6
sys/src/9/ip/ip.h

@@ -36,11 +36,11 @@ typedef struct 	Hostparams	Hostparams;
 typedef struct 	v6router	v6router;
 typedef struct	v6params	v6params;
 
-#pragma incomplete Arp
-#pragma incomplete Ipself
-#pragma incomplete Ipselftab
-#pragma incomplete IP
-#pragma incomplete Netlog
+//#pragma incomplete Arp
+//#pragma incomplete Ipself
+//#pragma incomplete Ipselftab
+//#pragma incomplete IP
+//#pragma incomplete Netlog
 
 enum
 {
@@ -522,7 +522,7 @@ void	ifclog(Fs*, uint8_t *, int);
 void	ifclogopen(Fs*, Chan*);
 void	ifclogclose(Fs*, Chan*);
 
-#pragma varargck argpos netlog	3
+//#pragma varargck argpos netlog	3
 
 /*
  *  iproute.c

+ 1 - 1
sys/src/9/port/devtls.c

@@ -262,7 +262,7 @@ static void	freeSec(Secret *sec);
 static char	*tlsstate(int s);
 static void	pdump(int, void*, char*);
 
-#pragma	varargck	argpos	rcvError	3
+//#pragma	varargck	argpos	rcvError	3
 
 static char *tlsnames[] = {
 [Qclonus] = "clone",

+ 3 - 3
sys/src/9/port/portfns.h

@@ -421,9 +421,9 @@ int		ziofmt(Fmt*);
 int		zputaddr(Segment*, uintptr_t);
 uint32_t		ms(void);
 
-#pragma		varargck	argpos	iprint		1
-#pragma		varargck	argpos	panic		1
-#pragma		varargck	argpos	pprint		1
+//#pragma		varargck	argpos	iprint		1
+//#pragma		varargck	argpos	panic		1
+//#pragma		varargck	argpos	pprint		1
 
 /* profiling. */
 void oprofile_control_trace(int onoff);

+ 2 - 2
sys/src/9/port/portusbehci.h

@@ -14,8 +14,8 @@
 typedef struct Ecapio Ecapio;
 typedef struct Edbgio Edbgio;
 
-#pragma incomplete Ecapio;
-#pragma incomplete Edbgio;
+//#pragma incomplete Ecapio;
+//#pragma incomplete Edbgio;
 
 /*
  * EHCI interface registers and bits

+ 1 - 1
sys/src/cmd/9660srv/9660srv.c

@@ -268,7 +268,7 @@ iwalk(Xfile *f, char *name)
 	int len, vers, dvers;
 
 	vers = -1;
-	if(p = strchr(name, ';')) {	/* assign = */
+	if((p = strchr(name, ';')) != nil) {	/* assign = */
 		len = p-name;
 		if(len >= Maxname)
 			len = Maxname-1;

+ 1 - 1
sys/src/cmd/9660srv/dat.h

@@ -15,7 +15,7 @@ typedef struct Xfile	Xfile;
 typedef struct Xfs	Xfs;
 typedef struct Xfsub	Xfsub;
 
-#pragma incomplete Isofile
+//#pragma incomplete Isofile
 
 enum
 {

+ 1 - 1
sys/src/cmd/acme/edit.h

@@ -7,7 +7,7 @@
  * in the LICENSE file.
  */
 
-#pragma	varargck	argpos	editerror	1
+//#pragma	varargck	argpos	editerror	1
 
 typedef struct Addr	Addr;
 typedef struct Address	Address;

+ 1 - 1
sys/src/cmd/acme/fns.h

@@ -7,7 +7,7 @@
  * in the LICENSE file.
  */
 
-#pragma	varargck	argpos	warning	2
+//#pragma	varargck	argpos	warning	2
 
 void	warning(Mntdir*, char*, ...);
 

+ 1 - 1
sys/src/cmd/acpica/acpiexec/aecommon.h

@@ -117,7 +117,7 @@
 #define _AECOMMON
 
 #ifdef _MSC_VER                 /* disable some level-4 warnings */
-#pragma warning(disable:4100)   /* warning C4100: unreferenced formal parameter */
+//#pragma warning(disable:4100)   /* warning C4100: unreferenced formal parameter */
 #endif
 
 #include "acpi.h"

+ 3 - 3
sys/src/cmd/aquarela/smbdat.h

@@ -26,9 +26,9 @@ typedef struct SmbLock SmbLock;
 typedef struct SmbLockList SmbLockList;
 typedef struct SmbSlut SmbSlut;
 
-#pragma incomplete SmbIdMap
-#pragma incomplete SmbBuffer
-#pragma incomplete SmbLockList
+//#pragma incomplete SmbIdMap
+//#pragma incomplete SmbBuffer
+//#pragma incomplete SmbLockList
 
 typedef int SMBCIFSWRITEFN(SmbCifsSession *cifs, void *buf, long n);
 typedef int SMBCIFSACCEPTFN(SmbCifsSession *cifs, SMBCIFSWRITEFN **fnp);

+ 2 - 2
sys/src/cmd/auth/as.c

@@ -33,8 +33,8 @@ int	qidcmp(Qid, Qid);
 void	runas(char *, char *);
 void	usage(void);
 
-#pragma varargck	argpos clog 1
-#pragma varargck	argpos fatal 1
+//#pragma varargck	argpos clog 1
+//#pragma varargck	argpos fatal 1
 
 static void
 fatal(char *fmt, ...)

+ 2 - 2
sys/src/cmd/auth/cron.c

@@ -95,8 +95,8 @@ sleepuntil(uint32_t tm)
 	return 0;
 }
 
-#pragma varargck	argpos clog 1
-#pragma varargck	argpos fatal 1
+//#pragma varargck	argpos clog 1
+//#pragma varargck	argpos fatal 1
 
 static void
 clog(char *fmt, ...)

+ 2 - 2
sys/src/cmd/aux/vga/vga.h

@@ -460,5 +460,5 @@ extern Ctlr w30c516;
 extern Ctlr mga4xx;
 extern Ctlr mga4xxhwgc;
 
-#pragma	varargck	argpos	error	1
-#pragma	varargck	argpos	trace	1
+//#pragma	varargck	argpos	error	1
+//#pragma	varargck	argpos	trace	1

+ 2 - 2
sys/src/cmd/disk/mkext.c

@@ -25,8 +25,8 @@ void	seekpast(uint64_t);
 void	error(char*, ...);
 void	warn(char*, ...);
 void	usage(void);
-#pragma varargck argpos warn 1
-#pragma varargck argpos error 1
+//#pragma varargck argpos warn 1
+//#pragma varargck argpos error 1
 
 Biobufhdr bin;
 unsigned char	binbuf[2*LEN];

+ 3 - 3
sys/src/cmd/dossrv/fns.h

@@ -13,8 +13,8 @@ void	bootdump(int, Dosboot*);
 void	bootsecdump32(int fd, Xfs *xf, Dosboot32 *b32);
 int	cfalloc(Xfile*);
 void	chat(char*, ...);
-#pragma	varargck	argpos	chat	1
-int	cistrcmp(char*, char*);
+//#pragma	varargck	argpos	chat	1
+int	cistrcmp(const char*, const char*);
 int	classifyname(char*);
 Xfile	*clean(Xfile*);
 int32_t	clust2sect(Dosbpb*, int32_t);
@@ -42,7 +42,7 @@ int	makecontig(Xfile*, int);
 void	mkalias(char*, char*, int);
 int	nameok(char*);
 void	panic(char*, ...);
-#pragma	varargck	argpos	panic	1
+//#pragma	varargck	argpos	panic	1
 void	putdir(Dosdir*, Dir*);
 void	putfat(Xfs*, int, uint32_t);
 void	putfile(Xfile*);

+ 5 - 5
sys/src/cmd/fossil/9.h

@@ -21,9 +21,9 @@ typedef struct Fid Fid;
 typedef struct Fsys Fsys;
 typedef struct Msg Msg;
 
-#pragma incomplete DirBuf
-#pragma incomplete Excl
-#pragma incomplete Fsys
+//#pragma incomplete DirBuf
+//#pragma incomplete Excl
+//#pragma incomplete Fsys
 
 struct Msg {
 	unsigned char*	data;
@@ -238,7 +238,7 @@ extern int cliAddCmd(char*, int (*)(int, char*[]));
 extern int cliError(char*, ...);
 extern int cliInit(void);
 extern int cliExec(char*);
-#pragma	varargck	argpos	cliError	1
+//#pragma	varargck	argpos	cliError	1
 
 /*
  * Ccmd.c
@@ -259,7 +259,7 @@ extern int consWrite(char*, int);
  */
 extern int consPrint(char*, ...);
 extern int consVPrint(char*, va_list);
-#pragma	varargck	argpos	consPrint	1
+//#pragma	varargck	argpos	consPrint	1
 
 /*
  * fossil.c

+ 3 - 3
sys/src/cmd/fossil/check.c

@@ -25,9 +25,9 @@ static int	walkEpoch(Fsck *chk, Block *b, uint8_t score[VtScoreSize],
 			int type, uint32_t tag, uint32_t epoch);
 static void	warn(Fsck*, char*, ...);
 
-#pragma varargck argpos error 2
-#pragma varargck argpos printnop 1
-#pragma varargck argpos warn 2
+//#pragma varargck argpos error 2
+//#pragma varargck argpos printnop 1
+//#pragma varargck argpos warn 2
 
 static Fsck*
 checkInit(Fsck *chk)

+ 6 - 6
sys/src/cmd/fossil/dat.h

@@ -22,12 +22,12 @@ typedef struct Source Source;
 typedef struct Super Super;
 typedef struct WalkPtr WalkPtr;
 
-#pragma incomplete Arch
-#pragma incomplete BList
-#pragma incomplete Cache
-#pragma incomplete Disk
-#pragma incomplete Periodic
-#pragma incomplete Snap
+//#pragma incomplete Arch
+//#pragma incomplete BList
+//#pragma incomplete Cache
+//#pragma incomplete Disk
+//#pragma incomplete Periodic
+//#pragma incomplete Snap
 
 /* tunable parameters - probably should not be constants */
 enum {

+ 1 - 1
sys/src/cmd/fossil/flchk.c

@@ -22,7 +22,7 @@ usage(void)
 	exits("usage");
 }
 
-#pragma	varargck	argpos	flprint	1
+//#pragma	varargck	argpos	flprint	1
 
 static int
 flprint(char *fmt, ...)

+ 3 - 3
sys/src/cmd/fossil/fs.h

@@ -11,9 +11,9 @@ typedef struct Fs Fs;
 typedef struct File File;
 typedef struct DirEntryEnum DirEntryEnum;
 
-#pragma incomplete Fs
-#pragma incomplete File
-#pragma incomplete DirEntryEnum
+//#pragma incomplete Fs
+//#pragma incomplete File
+//#pragma incomplete DirEntryEnum
 
 /* modes */
 

+ 2 - 2
sys/src/cmd/fossil/view.c

@@ -116,7 +116,7 @@ btStr(int type)
 		return bttab[type];
 	return "unknown";
 }
-#pragma varargck argpos stringnode 1
+//#pragma varargck argpos stringnode 1
 
 Block*
 allocBlock(void)
@@ -310,7 +310,7 @@ copyMetaBlock(MetaBlock mb)
  * visualizer 
  */
 
-#pragma	varargck	argpos	stringnode	1
+//#pragma	varargck	argpos	stringnode	1
 
 Tnode*
 stringnode(char *fmt, ...)

+ 1 - 1
sys/src/cmd/gzip/gunzip.c

@@ -29,7 +29,7 @@ static	int	gunzip(int ofd, char *ofile, Biobuf *bin);
 static	void	header(Biobuf *bin, GZHead *h);
 static	void	trailer(Biobuf *bin, int32_t wlen);
 static	void	error(char*, ...);
-#pragma	varargck	argpos	error	1
+//#pragma	varargck	argpos	error	1
 
 static	Biobuf	bin;
 static	uint32_t	crc;

+ 1 - 1
sys/src/cmd/gzip/unzip.c

@@ -38,7 +38,7 @@ static	int	wantFile(char *file);
 
 static	void	*emalloc(uint32_t);
 static	void	error(char*, ...);
-#pragma	varargck	argpos	error	1
+//#pragma	varargck	argpos	error	1
 
 static	Biobuf	bin;
 static	uint32_t	crc;

+ 1 - 1
sys/src/cmd/gzip/zip.c

@@ -30,7 +30,7 @@ static	void	trailer(Biobuf *bout, ZipHead *zh, int64_t off);
 static	void	putCDir(Biobuf *bout);
 
 static	void	error(char*, ...);
-#pragma	varargck	argpos	error	1
+//#pragma	varargck	argpos	error	1
 
 static	Biobuf	bout;
 static	uint32_t	crc;

+ 1 - 1
sys/src/cmd/ip/ftpfs/ftpfs.h

@@ -11,7 +11,7 @@ typedef struct File	File;
 typedef struct Node	Node;
 typedef struct OS	OS;
 
-#pragma incomplete File
+//#pragma incomplete File
 
 enum
 {

+ 2 - 2
sys/src/cmd/ip/httpd/httpsrv.h

@@ -78,9 +78,9 @@ char			*undecorated(char *repl);
 
 /* log.c */
 void			logit(HConnect*, char*, ...);
-#pragma	varargck	argpos	logit	2
+//#pragma	varargck	argpos	logit	2
 void			writelog(HConnect*, char*, ...);
-#pragma	varargck	argpos	writelog	2
+//#pragma	varargck	argpos	writelog	2
 
 /* authorize.c */
 int authorize(HConnect*, char*);

+ 1 - 1
sys/src/cmd/ip/ipconfig/ipv6.c

@@ -20,7 +20,7 @@
 #include "ipconfig.h"
 #include "../icmp.h"
 
-#pragma varargck argpos ralog 1
+//#pragma varargck argpos ralog 1
 
 #define RALOG "v6routeradv"
 

+ 1 - 1
sys/src/cmd/ip/pptp.c

@@ -53,7 +53,7 @@ void	getaddrs(void);
 void	*emalloc(int32_t);
 void	ewrite(int, void*, int);
 void	myfatal(char*, ...);
-#pragma varargck argpos myfatal 1
+//#pragma varargck argpos myfatal 1
 int	pptp(char*);
 void	pushppp(int);
 void	recordack(int);

+ 3 - 3
sys/src/cmd/map/map.c

@@ -910,9 +910,9 @@ nocut(struct place *g, struct place *og, double *cutlon)
 {
 	USED(g, og, cutlon);
 /*
-#pragma	ref g
-#pragma	ref og
-#pragma	ref cutlon
+//#pragma	ref g
+//#pragma	ref og
+//#pragma	ref cutlon
 */
 	return(1);
 }

+ 1 - 1
sys/src/cmd/map/route.c

@@ -58,7 +58,7 @@ rinvert(double a, double b, double *x, double *y)
 
 main(int argc, char **argv)
 {
-#pragma ref argv
+//#pragma ref argv
 	double an,aw,bn,bw;
 	ARGBEGIN {
 	case 't':

+ 2 - 2
sys/src/cmd/rc/rc.h

@@ -51,8 +51,8 @@ typedef struct thread thread;
 typedef struct builtin builtin;
 
 #ifndef Unix
-#pragma incomplete word
-#pragma incomplete io
+//#pragma incomplete word
+//#pragma incomplete io
 #endif
 
 struct tree{

+ 1 - 1
sys/src/cmd/scuzz/scsireq.h

@@ -9,7 +9,7 @@
 
 /* this file is also included by usb/disk and cdfs */
 typedef struct Umsc Umsc;
-#pragma incomplete Umsc
+//#pragma incomplete Umsc
 
 enum {					/* fundamental constants/defaults */
 	NTargetID	= 8,		/* number of target IDs */

+ 4 - 4
sys/src/cmd/ssh1/ssh.h

@@ -142,7 +142,7 @@ typedef struct CipherState CipherState;
 typedef struct Conn Conn;
 typedef struct Msg Msg;
 
-#pragma incomplete CipherState
+//#pragma incomplete CipherState
 
 struct Auth
 {
@@ -307,6 +307,6 @@ void		sshlog(char*, ...);
 void		setaliases(Conn*, char*);
 void		privatefactotum(void);
 
-#pragma varargck argpos debug 2
-#pragma varargck argpos error 1
-#pragma varargck argpos sshlog 2
+//#pragma varargck argpos debug 2
+//#pragma varargck argpos error 1
+//#pragma varargck argpos sshlog 2

+ 4 - 4
sys/src/cmd/ssh2/ssh2.h

@@ -24,11 +24,11 @@ enum {
 };
 
 typedef struct Conn Conn;
-#pragma incomplete Conn
+//#pragma incomplete Conn
 
-#pragma	varargck argpos	esmprint 1
-#pragma	varargck argpos	ssdebug	2
-#pragma	varargck argpos	sshlog	2
+//#pragma	varargck argpos	esmprint 1
+//#pragma	varargck argpos	ssdebug	2
+//#pragma	varargck argpos	sshlog	2
 
 char *esmprint(char *format, ...);
 void sshdebug(Conn *, char *format, ...);

+ 2 - 2
sys/src/cmd/vac/vac.h

@@ -12,8 +12,8 @@ typedef struct VacDir VacDir;
 typedef struct VacFile VacFile;
 typedef struct VacDirEnum VacDirEnum;
 
-#pragma incomplete VacFile
-#pragma incomplete VacDirEnum
+//#pragma incomplete VacFile
+//#pragma incomplete VacDirEnum
 
 /*
  * Mode bits

+ 3 - 3
sys/src/cmd/venti/srv/fns.h

@@ -222,9 +222,9 @@ Packet		*zblock2packet(ZBlock *zb, uint32_t size);
 void		zeropart(Part *part, int blocksize);
 
 /*
-#pragma	varargck	argpos	sysfatal		1
-#pragma	varargck	argpos	logerr		2
-#pragma	varargck	argpos	SetErr		2
+//#pragma	varargck	argpos	sysfatal		1
+//#pragma	varargck	argpos	logerr		2
+//#pragma	varargck	argpos	SetErr		2
 */
 
 #define scorecmp(h1,h2)		memcmp((h1),(h2),VtScoreSize)

+ 2 - 2
sys/src/cmd/venti/srv/mirrorarenas.c

@@ -73,8 +73,8 @@ chat(char *fmt, ...)
 	va_end(arg);
 }
 
-#pragma varargck argpos tag 1
-#pragma varargck argpos chat 1
+//#pragma varargck argpos tag 1
+//#pragma varargck argpos chat 1
 
 
 int

+ 1 - 1
sys/src/cmd/vnc/compat.h

@@ -174,4 +174,4 @@ void		shutdown(void);
 
 void		screeninit(int, int, char*);
 
-#pragma	varargck	argpos	panic		1
+//#pragma	varargck	argpos	panic		1

+ 1 - 1
sys/src/cmd/webfs/fns.h

@@ -45,7 +45,7 @@ void		httpclose(Client*);
 /* io.c */
 int		iotlsdial(Ioproc*, char*, char*, char*, int*, int);
 int		ioprint(Ioproc*, int, char*, ...);
-#pragma varargck argpos ioprint 3
+//#pragma varargck argpos ioprint 3
 
 /* plumb.c */
 void	plumbinit(void);

+ 1 - 1
sys/src/cmd/zenith/edit.h

@@ -7,7 +7,7 @@
  * in the LICENSE file.
  */
 
-#pragma	varargck	argpos	editerror	1
+//#pragma	varargck	argpos	editerror	1
 
 typedef struct Addr	Addr;
 typedef struct Address	Address;

+ 1 - 1
sys/src/cmd/zenith/fns.h

@@ -7,7 +7,7 @@
  * in the LICENSE file.
  */
 
-#pragma	varargck	argpos	warning	2
+//#pragma	varargck	argpos	warning	2
 
 void	warning(Mntdir*, char*, ...);
 

+ 7 - 7
sys/src/libmemdraw/draw.c

@@ -573,19 +573,19 @@ dumpbuf(char *s, Buffer b, int n)
 	print("%s", s);
 	for(i=0; i<n; i++){
 		print(" ");
-		if(p=b.grey){
+		if((p=b.grey) != 0){
 			print(" k%.2X", *p);
 			b.grey += b.delta;
 		}else{	
-			if(p=b.red){
+			if((p=b.red) != 0){
 				print(" r%.2X", *p);
 				b.red += b.delta;
 			}
-			if(p=b.grn){
+			if((p=b.grn) != 0){
 				print(" g%.2X", *p);
 				b.grn += b.delta;
 			}
-			if(p=b.blu){
+			if((p=b.blu) != 0){
 				print(" b%.2X", *p);
 				b.blu += b.delta;
 			}
@@ -1314,8 +1314,8 @@ readnbit(Param *p, uint8_t *buf, int y)
 DBG print("readnbit dx %d %p=%p+%d*%d, *r=%d fetch %d ", dx, r, p->bytermin, y, p->bwidth, *r, n);
 	bits = *r++;
 	nbits = 8;
-	if(i=x&(npack-1)){
-DBG print("throwaway %d...", i);
+	if((i=x&(npack-1)) != 0){
+		DBG print("throwaway %d...", i);
 		bits <<= depth*i;
 		nbits -= depth*i;
 	}
@@ -1346,7 +1346,7 @@ DBG print("bit %x...", repl[bits>>sh]);
 DBG print("x=%d r=%p...", x, r);
 	bits = *r++;
 	nbits = 8;
-	if(i=x&(npack-1)){
+	if((i=x&(npack-1)) != 0){
 		bits <<= depth*i;
 		nbits -= depth*i;
 	}

+ 2 - 2
sys/src/libmemdraw/ellipse.c

@@ -133,8 +133,8 @@ memellipse(Memimage *dst, Point c, int a, int b, int t, Memimage *src, Point sp,
 	p.op = op;
 
 	u = (t<<1)*(a-b);
-	if(b<a && u>b*b || a<b && -u>a*a) {
-/*	if(b<a&&(t<<1)>b*b/a || a<b&&(t<<1)>a*a/b)	# very thick */
+	if((b<a && u>b*b) || (a<b && -u>a*a)) {
+/*	if((b<a&&(t<<1)>b*b/a) || (a<b&&(t<<1)>a*a/b))	# very thick */
 		bellipse(b, newstate(&in, a, b), &p);
 		return;
 	}

+ 2 - 2
sys/src/libmemdraw/string.c

@@ -23,7 +23,7 @@ memimagestring(Memimage *b, Point p, Memimage *color, Point cp, Memsubfont *f,
 	Fontchar *i;
 
 	s = (uint8_t*)cs;
-	for(; c=*s; p.x+=width, cp.x+=width){
+	for(; (c=*s) != '\0'; p.x+=width, cp.x+=width){
 		width = 0;
 		if(c < Runeself)
 			s++;
@@ -56,7 +56,7 @@ memsubfontwidth(Memsubfont *f, char *cs)
 
 	p = Pt(0, f->height);
 	s = (uint8_t*)cs;
-	for(; c=*s; p.x+=width){
+	for(; (c=*s) != '\0'; p.x+=width){
 		width = 0;
 		if(c < Runeself)
 			s++;

+ 1 - 1
sys/src/libmp/port/cnfield.c

@@ -110,7 +110,7 @@ cnfield(mpint *N)
 		return nil;
 	f = nil;
 	d = N->p[N->top-1];
-	for(s = 0; (d & (mpdigit)1<<Dbits-1) == 0; s++)
+	for(s = 0; (d & (mpdigit)1<<(Dbits-1)) == 0; s++)
 		d <<= 1;
 	C = mpnew(0);
 	M = mpcopy(N);

+ 6 - 6
sys/src/libndb/ndbhash.c

@@ -211,8 +211,8 @@ ndbsnext(Ndbs *s, char *attr, char *val)
 			s->ptr = Boffset(&db->b);
 			if(t == 0)
 				break;
-			if(s->t = match(t, attr, val)){
-				ndbsetmalloctag(t, getcallerpc(&s));
+			if((s->t = match(t, attr, val)) != 0){
+				ndbsetmalloctag(t, getcallerpc());
 				return t;
 			}
 			ndbfree(t);
@@ -224,8 +224,8 @@ ndbsnext(Ndbs *s, char *attr, char *val)
 			t = ndbparse(db);
 			if(t == 0)
 				break;
-			if(s->t = match(t, attr, val)){
-				ndbsetmalloctag(t, getcallerpc(&s));
+			if((s->t = match(t, attr, val)) != 0){
+				ndbsetmalloctag(t, getcallerpc());
 				return t;
 			}
 			ndbfree(t);
@@ -245,8 +245,8 @@ ndbsnext(Ndbs *s, char *attr, char *val)
 				t = ndbparse(db);
 				if(t == 0)
 					break;
-				if(s->t = match(t, attr, val)){
-					ndbsetmalloctag(t, getcallerpc(&s));
+				if((s->t = match(t, attr, val)) != 0){
+					ndbsetmalloctag(t, getcallerpc());
 					return t;
 				}
 				ndbfree(t);

+ 3 - 3
sys/src/liboventi/rpc.c

@@ -16,8 +16,8 @@ struct {
 	int version;
 	char *s;
 } vtVersions[] = {
-	VtVersion02, "02",
-	0, 0,
+	{VtVersion02, "02"},
+	{0, 0},
 };
 
 static char EBigString[] = "string too long";
@@ -247,7 +247,7 @@ vtVersionRead(VtSession *z, char *prefix, int *ret)
 			*p = 0;
 			break;
 		}
-		if(c < ' ' || *q && c != *q) {
+		if(c < ' ' || (*q && c != *q)) {
 			vtSetError(EBadVersion);
 			return 0;
 		}

+ 1 - 1
sys/src/libscribble/scribbleimpl.h

@@ -31,7 +31,7 @@
  * Opaque type for the recognizer. The toolkit must access through
  * appropriate access functions.
  */
-#pragma incomplete struct _Recognizer
+//#pragma incomplete struct _Recognizer
 typedef struct _Recognizer* recognizer;
 
 /*

+ 3 - 3
sys/src/libsec/port/tlshand.c

@@ -359,8 +359,8 @@ static uint8_t compressors[] = {
 };
 
 static Namedcurve namedcurves[] = {
-	0x0017, secp256r1,
-	0x0018, secp384r1,
+	{0x0017, secp256r1},
+	{0x0018, secp384r1},
 };
 
 static uint8_t pointformats[] = {
@@ -406,7 +406,7 @@ static char* msgPrint(char *buf, int n, Msg *m);
 static int	msgRecv(TlsConnection *c, Msg *m);
 static int	msgSend(TlsConnection *c, Msg *m, int act);
 static void	tlsError(TlsConnection *c, int err, char *msg, ...);
-#pragma	varargck argpos	tlsError 3
+//#pragma	varargck argpos	tlsError 3
 static int setVersion(TlsConnection *c, int version);
 static int setSecrets(TlsConnection *c, int isclient);
 static int finishedMatch(TlsConnection *c, Finished *f);

+ 36 - 36
sys/src/libsec/port/x509.c

@@ -1654,30 +1654,30 @@ enum {
 	MAXdlen = SHA2_512dlen,
 };
 
-static Ints15 oid_rsaEncryption = {7, 1, 2, 840, 113549, 1, 1, 1 };
-
-static Ints15 oid_md2WithRSAEncryption = {7, 1, 2, 840, 113549, 1, 1, 2 };
-static Ints15 oid_md4WithRSAEncryption = {7, 1, 2, 840, 113549, 1, 1, 3 };
-static Ints15 oid_md5WithRSAEncryption = {7, 1, 2, 840, 113549, 1, 1, 4 };
-static Ints15 oid_sha1WithRSAEncryption ={7, 1, 2, 840, 113549, 1, 1, 5 };
-static Ints15 oid_sha1WithRSAEncryptionOiw ={6, 1, 3, 14, 3, 2, 29 };
-static Ints15 oid_sha256WithRSAEncryption = {7, 1, 2, 840, 113549, 1, 1, 11 };
-static Ints15 oid_sha384WithRSAEncryption = {7, 1, 2, 840, 113549, 1, 1, 12 };
-static Ints15 oid_sha512WithRSAEncryption = {7, 1, 2, 840, 113549, 1, 1, 13 };
-static Ints15 oid_sha224WithRSAEncryption = {7, 1, 2, 840, 113549, 1, 1, 14 };
-
-static Ints15 oid_ecPublicKey = {6, 1, 2, 840, 10045, 2, 1 };
-static Ints15 oid_sha1WithECDSA = {6, 1, 2, 840, 10045, 4, 1 };
-static Ints15 oid_sha256WithECDSA = {7, 1, 2, 840, 10045, 4, 3, 2 };
-static Ints15 oid_sha384WithECDSA = {7, 1, 2, 840, 10045, 4, 3, 3 };
-static Ints15 oid_sha512WithECDSA = {7, 1, 2, 840, 10045, 4, 3, 4 };
-
-static Ints15 oid_md5 = {6, 1, 2, 840, 113549, 2, 5 };
-static Ints15 oid_sha1 = {6, 1, 3, 14, 3, 2, 26 };
-static Ints15 oid_sha256= {9, 2, 16, 840, 1, 101, 3, 4, 2, 1 };
-static Ints15 oid_sha384= {9, 2, 16, 840, 1, 101, 3, 4, 2, 2 };
-static Ints15 oid_sha512= {9, 2, 16, 840, 1, 101, 3, 4, 2, 3 };
-static Ints15 oid_sha224= {9, 2, 16, 840, 1, 101, 3, 4, 2, 4 };
+static Ints15 oid_rsaEncryption = {7, {1, 2, 840, 113549, 1, 1, 1} };
+
+static Ints15 oid_md2WithRSAEncryption = {7, {1, 2, 840, 113549, 1, 1, 2} };
+static Ints15 oid_md4WithRSAEncryption = {7, {1, 2, 840, 113549, 1, 1, 3} };
+static Ints15 oid_md5WithRSAEncryption = {7, {1, 2, 840, 113549, 1, 1, 4} };
+static Ints15 oid_sha1WithRSAEncryption ={7, {1, 2, 840, 113549, 1, 1, 5} };
+static Ints15 oid_sha1WithRSAEncryptionOiw ={6, {1, 3, 14, 3, 2, 29} };
+static Ints15 oid_sha256WithRSAEncryption = {7, {1, 2, 840, 113549, 1, 1, 11} };
+static Ints15 oid_sha384WithRSAEncryption = {7, {1, 2, 840, 113549, 1, 1, 12} };
+static Ints15 oid_sha512WithRSAEncryption = {7, {1, 2, 840, 113549, 1, 1, 13} };
+static Ints15 oid_sha224WithRSAEncryption = {7, {1, 2, 840, 113549, 1, 1, 14} };
+
+static Ints15 oid_ecPublicKey = {6, {1, 2, 840, 10045, 2, 1} };
+static Ints15 oid_sha1WithECDSA = {6, {1, 2, 840, 10045, 4, 1} };
+static Ints15 oid_sha256WithECDSA = {7, {1, 2, 840, 10045, 4, 3, 2} };
+static Ints15 oid_sha384WithECDSA = {7, {1, 2, 840, 10045, 4, 3, 3} };
+static Ints15 oid_sha512WithECDSA = {7, {1, 2, 840, 10045, 4, 3, 4} };
+
+static Ints15 oid_md5 = {6, {1, 2, 840, 113549, 2, 5} };
+static Ints15 oid_sha1 = {6, {1, 3, 14, 3, 2, 26} };
+static Ints15 oid_sha256= {9, {2, 16, 840, 1, 101, 3, 4, 2, 1} };
+static Ints15 oid_sha384= {9, {2, 16, 840, 1, 101, 3, 4, 2, 2} };
+static Ints15 oid_sha512= {9, {2, 16, 840, 1, 101, 3, 4, 2, 3} };
+static Ints15 oid_sha224= {9, {2, 16, 840, 1, 101, 3, 4, 2, 4} };
 
 static Ints *alg_oid_tab[NUMALGS+1] = {
 	(Ints*)&oid_rsaEncryption,
@@ -1719,8 +1719,8 @@ static DigestAlg *digestalg[NUMALGS+1] = {
 
 static Bytes* encode_digest(DigestAlg *da, uint8_t *digest);
 
-static Ints15 oid_secp256r1 = {7, 1, 2, 840, 10045, 3, 1, 7};
-static Ints15 oid_secp384r1 = {5, 1, 3, 132, 0, 34};
+static Ints15 oid_secp256r1 = {7, {1, 2, 840, 10045, 3, 1, 7}};
+static Ints15 oid_secp384r1 = {5, {1, 3, 132, 0, 34}};
 
 static Ints *namedcurves_oid_tab[] = {
 	(Ints*)&oid_secp256r1,
@@ -2600,14 +2600,14 @@ typedef struct Ints7pref {
 	int	stype;
 } Ints7pref;
 Ints7pref DN_oid[] = {
-	{4, 2, 5, 4, 6, 0, 0, 0,        "C=", PrintableString},
-	{4, 2, 5, 4, 8, 0, 0, 0,        "ST=",DirectoryString},
-	{4, 2, 5, 4, 7, 0, 0, 0,        "L=", DirectoryString},
-	{4, 2, 5, 4, 10, 0, 0, 0,       "O=", DirectoryString},
-	{4, 2, 5, 4, 11, 0, 0, 0,       "OU=",DirectoryString},
-	{4, 2, 5, 4, 3, 0, 0, 0,        "CN=",DirectoryString},
-	{7, 1,2,840,113549,1,9,1,       "E=", IA5String},
-	{7, 0,9,2342,19200300,100,1,25,	"DC=",IA5String},
+	{4, {2, 5, 4, 6, 0, 0, 0},        "C=", PrintableString},
+	{4, {2, 5, 4, 8, 0, 0, 0},        "ST=",DirectoryString},
+	{4, {2, 5, 4, 7, 0, 0, 0},        "L=", DirectoryString},
+	{4, {2, 5, 4, 10, 0, 0, 0},       "O=", DirectoryString},
+	{4, {2, 5, 4, 11, 0, 0, 0},       "OU=",DirectoryString},
+	{4, {2, 5, 4, 3, 0, 0, 0},        "CN=",DirectoryString},
+	{7, {1,2,840,113549,1,9,1},       "E=", IA5String},
+	{7, {0,9,2342,19200300,100,1,25}, "DC=",IA5String},
 };
 
 static Elem
@@ -2750,8 +2750,8 @@ mkextel(Elem e, Ints *oid, Elist *el)
 	return el;
 }
 
-static Ints15 oid_subjectAltName = {4, 2, 5, 29, 17 };
-static Ints15 oid_extensionRequest = { 7, 1, 2, 840, 113549, 1, 9, 14};
+static Ints15 oid_subjectAltName = {4, {2, 5, 29, 17} };
+static Ints15 oid_extensionRequest = {7, {1, 2, 840, 113549, 1, 9, 14}};
 
 static Elist*
 mkextensions(char *alts, int req)

+ 4 - 4
sys/src/libstdio/vfprintf.c

@@ -219,7 +219,7 @@ vfprintf(FILE *f, const char *s, va_list args)
 static int
 ocvt_c(FILE *f, va_list *args, int flags, int width, int precision)
 {
-#pragma ref precision
+//#pragma ref precision
 	int i;
 
 	if(!(flags&LEFT)) for(i=1; i<width; i++) putc(' ', f);
@@ -268,9 +268,9 @@ ocvt_s(FILE *f, va_list *args, int flags, int width, int precision)
 static int
 ocvt_n(FILE *f, va_list *args, int flags, int width, int precision)
 {
-#pragma ref f
-#pragma ref width
-#pragma ref precision
+//#pragma ref f
+//#pragma ref width
+//#pragma ref precision
 	if(flags&SHORT)
 		*va_arg(*args, int16_t *) = nprint;
 	else if(flags&LONG)

+ 5 - 5
sys/src/libstdio/vfscanf.c

@@ -112,8 +112,8 @@ int vfscanf(FILE *f, const char *s, va_list args){
 	return ncvt;	
 }
 static int icvt_n(FILE *f, va_list *args, int store, int width, int type){
-#pragma ref f
-#pragma ref width
+//#pragma ref f
+//#pragma ref width
 	if(store){
 		--ncvt;	/* this assignment doesn't count! */
 		switch(type){
@@ -285,7 +285,7 @@ Done:
 	return 1;
 }
 static int icvt_s(FILE *f, va_list *args, int store, int width, int type){
-#pragma ref type
+//#pragma ref type
 	int c, nn;
 	register char *s;
 	if(store) s=va_arg(*args, char *);
@@ -313,7 +313,7 @@ Done:
 	return 1;
 }
 static int icvt_c(FILE *f, va_list *args, int store, int width, int type){
-#pragma ref type
+//#pragma ref type
 	int c;
 	register char *s;
 	if(store) s=va_arg(*args, char *);
@@ -345,7 +345,7 @@ static int match(int c, const char *pat){
 	return !ok;
 }
 static int icvt_sq(FILE *f, va_list *args, int store, int width, int type){
-#pragma ref type
+//#pragma ref type
 	int c, nn;
 	register char *s;
 	register const char *pat;

+ 1 - 1
sys/src/libventi/queue.h

@@ -8,7 +8,7 @@
  */
 
 typedef struct Queue Queue;
-#pragma incomplete Queue
+//#pragma incomplete Queue
 Queue *_vtqalloc(void);
 int _vtqsend(Queue*, void*);
 void *_vtqrecv(Queue*);