--- /dev/null
+# $ valgrind [valgrind opts] darkplaces [dp args]
+--suppressions=valgrind_dp.supp
#ifdef SUPPORTIPV6
static int LHNETADDRESS_Resolve(lhnetaddressnative_t *address, const char *name, int port)
{
- char port_buff [16];
+ char port_buff [16] = {0};
struct addrinfo hints;
struct addrinfo* addrinf;
int err;
int i, port, d1, d2, d3, d4, resolved;
size_t namelen;
unsigned char *a;
- char name[128];
+ char name[128] = {0};
#ifdef STANDALONETEST
char string2[128];
#endif
void Matrix4x4_CreateFromQuakeEntity(matrix4x4_t *out, double x, double y, double z, double pitch, double yaw, double roll, double scale)
{
double angle, sr, sp, sy, cr, cp, cy;
+ angle = sr = sp = sy = cr = cp = cy = 0; // valgrind
if (roll)
{
Con_Printf("received DarkPlaces %sserver list...\n", isextended ? "extended " : "");
while (length >= 7)
{
- char ipstring [128];
+ char ipstring[128] = {0};
// IPv4 address
if (data[0] == '\\')
continue;
}
- serverlist_querysleep = false;
- if( entry->querycounter != 0 && entry->querytime > timeouttime )
+ serverlist_querysleep = false;
+ if( entry->querycounter != 0 && entry->querytime > timeouttime )
{
continue;
}
- if( entry->querycounter != (unsigned) net_slist_maxtries.integer )
+ if( entry->querycounter != (unsigned) net_slist_maxtries.integer )
{
- lhnetaddress_t address;
+ lhnetaddress_t address = {0};
int socket;
LHNETADDRESS_FromString(&address, entry->info.cname, 0);
--- /dev/null
+# valgrind error suppression file for darkplaces
+#
+# (please expand and generalize -- only where needed)
+# how to write these: http://valgrind.org/docs/manual/mc-manual.html#mc-manual.suppfiles
+
+# suppress (leak) errors in all shared libraries
+#{
+# ignore_unversioned_libs_leak
+# Memcheck:Leak
+# ...
+# obj:*/lib*/lib*.so
+#}
+#{
+# ignore_versioned_libs_leak
+# Memcheck:Leak
+# ...
+# obj:*/lib*/lib*.so.*
+#}
+
+# SDL
+# ignore calls to it (or not, there are only a few issues here)
+#{
+# sdl_c
+# Memcheck:Cond
+# obj:/usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0.11.4
+# ...
+#}
+
+# fglrx. IGNORE them all...
+# (these read: "ignoring anything that called into or is called by this lib (callbacks")
+{
+ ignore_fglrx_dri_leak
+ Memcheck:Leak
+ ...
+ obj:/usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
+ ...
+}
+{
+ ignore_fglrx_dri_1
+ Memcheck:Addr1
+ ...
+ obj:/usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
+ ...
+}
+{
+ ignore_fglrx_dri_2
+ Memcheck:Addr2
+ ...
+ obj:/usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
+ ...
+}
+{
+ ignore_fglrx_dri_4
+ Memcheck:Addr4
+ ...
+ obj:/usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
+ ...
+}
+{
+ ignore_fglrx_dri_8
+ Memcheck:Addr8
+ ...
+ obj:/usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
+ ...
+}
+{
+ ignore_fglrx_dri_o
+ Memcheck:Overlap
+ ...
+ obj:/usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
+ ...
+}
+{
+ ignore_fglrx_dri_c
+ Memcheck:Cond
+ ...
+ obj:/usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
+ ...
+}
+{
+ ignore_fglrx_dri_p
+ Memcheck:Param
+ ioctl(generic)
+ ...
+ obj:/usr/lib/x86_64-linux-gnu/dri/fglrx_dri.so
+ ...
+}
void V_CalcRefdefUsing (const matrix4x4_t *entrendermatrix, const vec3_t clviewangles, qboolean teleported, qboolean clonground, qboolean clcmdjump, float clstatsviewheight, qboolean cldead, qboolean clintermission, const vec3_t clvelocity)
{
float vieworg[3], viewangles[3], smoothtime;
- float gunorg[3], gunangles[3];
+ float gunorg[3], gunangles[3] = {0};
matrix4x4_t tmpmatrix;
-
+
static float viewheightavg;
- float viewheight;
+ float viewheight;
#if 0
// begin of chase camera bounding box size for proper collisions by Alexander Zubov
vec3_t camboxmins = {-3, -3, -3};