summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2020-07-31 14:58:53 +0000
committerderaadt <deraadt@openbsd.org>2020-07-31 14:58:53 +0000
commit8b3dfcdb98f490a412651a045f1f5cd6d90ba297 (patch)
treebcd21e19a63ae89fc9eeee438b4bfb1c4bd513bd
parentlike amd64: (diff)
downloadwireguard-openbsd-8b3dfcdb98f490a412651a045f1f5cd6d90ba297.tar.xz
wireguard-openbsd-8b3dfcdb98f490a412651a045f1f5cd6d90ba297.zip
Skip making structure elements const, as it provides no benefit, and
it would require a pile of pointless de-const casts in the firmware construction code.
-rw-r--r--sys/dev/microcode/neomagic/build.c4
-rw-r--r--sys/dev/microcode/neomagic/neo-coeff.h6
-rw-r--r--sys/dev/pci/neoreg.h6
3 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/microcode/neomagic/build.c b/sys/dev/microcode/neomagic/build.c
index 05dbea62624..5b2825e60ee 100644
--- a/sys/dev/microcode/neomagic/build.c
+++ b/sys/dev/microcode/neomagic/build.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: build.c,v 1.2 2005/05/17 18:48:52 jason Exp $ */
+/* $OpenBSD: build.c,v 1.3 2020/07/31 14:58:53 deraadt Exp $ */
/*
* Copyright (c) 2004 Theo de Raadt <deraadt@openbsd.org>
@@ -48,7 +48,7 @@ main(int argc, char *argv[])
err(1, "%s", FILENAME);
if (rlen != sizeof nf)
errx(1, "%s: short write", FILENAME);
- printf("created %s length %d\n", FILENAME, sizeof nf);
+ printf("created %s length %zd\n", FILENAME, sizeof nf);
close(fd);
return (0);
}
diff --git a/sys/dev/microcode/neomagic/neo-coeff.h b/sys/dev/microcode/neomagic/neo-coeff.h
index fb5f77b6e59..719a7e649a7 100644
--- a/sys/dev/microcode/neomagic/neo-coeff.h
+++ b/sys/dev/microcode/neomagic/neo-coeff.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: neo-coeff.h,v 1.2 2004/11/22 04:29:06 deraadt Exp $ */
+/* $OpenBSD: neo-coeff.h,v 1.3 2020/07/31 14:58:53 deraadt Exp $ */
/*
* Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
@@ -32,7 +32,7 @@
#define NM_TOTAL_COEFF_COUNT 0x3158
-static const char coefficients[NM_TOTAL_COEFF_COUNT * 4] = {
+static char coefficients[NM_TOTAL_COEFF_COUNT * 4] = {
0xFF, 0xFF, 0x2F, 0x00, 0x4B, 0xFF, 0xA5, 0x01, 0xEF, 0xFC, 0x21,
0x05, 0x87, 0xF7, 0x62, 0x11, 0xE9, 0x45, 0x5E, 0xF9, 0xB5, 0x01,
0xDE, 0xFF, 0xA4, 0xFF, 0x60, 0x00, 0xCA, 0xFF, 0x0D, 0x00, 0xFD,
@@ -4629,7 +4629,7 @@ static const char coefficients[NM_TOTAL_COEFF_COUNT * 4] = {
0x01, 0x8D, 0xFF, 0x0F, 0x00
};
-static const u_int16_t
+static u_int16_t
coefficientSizes[NM_COEFF_SIZES] = {
/* Playback */
0x00C0, 0x5000, 0x0060, 0x2800, 0x0040, 0x0060, 0x1400, 0x0000,
diff --git a/sys/dev/pci/neoreg.h b/sys/dev/pci/neoreg.h
index d9772a079dc..43bbf018181 100644
--- a/sys/dev/pci/neoreg.h
+++ b/sys/dev/pci/neoreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: neoreg.h,v 1.2 2004/11/22 04:27:14 deraadt Exp $ */
+/* $OpenBSD: neoreg.h,v 1.3 2020/07/31 14:58:53 deraadt Exp $ */
/*
* Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
@@ -117,8 +117,8 @@
#define NM_COEFF_SIZES 2*8
struct neo_firmware {
- const u_int16_t coefficientSizes[NM_COEFF_SIZES];
- const char coefficients[NM_TOTAL_COEFF_COUNT*4];
+ u_int16_t coefficientSizes[NM_COEFF_SIZES];
+ char coefficients[NM_TOTAL_COEFF_COUNT*4];
};