Hi,
attached patch marks several function & datastructures without
prototypes, which aren't used outside their declaring sourcefiles as
static.
Please consider applying.
Regards,
Stefan
diff -u lib/sound/playlist.c lib/sound/playlist.c
--- lib/sound/playlist.c (working copy)
+++ lib/sound/playlist.c (working copy)
@@ -126,7 +126,7 @@
return 0;
}
-void PlayList_Shuffle() {
+static void PlayList_Shuffle(void) {
if (CURRENT_TRACK.shuffle) {
unsigned int i;
diff -u lib/sound/cdaudio.c lib/sound/cdaudio.c
--- lib/sound/cdaudio.c (working copy)
+++ lib/sound/cdaudio.c (working copy)
@@ -233,7 +233,7 @@
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
-int mp3_read_buffer(char *buffer, const int size) {
+static int mp3_read_buffer(char *buffer, const int size) {
int samples = 0;
while (samples < size) {
@@ -264,7 +264,7 @@
#endif
#ifndef WZ_CDA
-BOOL cdAudio_OpenTrack(char* filename) {
+static BOOL cdAudio_OpenTrack(char* filename) {
if (!music_initialized) {
return FALSE;
}
@@ -356,7 +356,7 @@
return FALSE; // unhandled
}
-BOOL cdAudio_CloseTrack() {
+static BOOL cdAudio_CloseTrack(void) {
if (music_track != 0) {
int queued, processed, all;
@@ -384,7 +384,7 @@
return TRUE;
}
-BOOL cdAudio_FillBuffer(ALuint b) {
+static BOOL cdAudio_FillBuffer(ALuint b) {
int size = 0;
int section;
int result = 0;
@@ -549,7 +549,7 @@
// ======================================================================
// ======================================================================
//
-void cdAudio_SetVolume( SDWORD iVol )
+static void cdAudio_SetVolume( SDWORD iVol )
{
#ifdef WZ_CDA
#else
--- lib/sequence/adpcm.c (working copy)
+++ lib/sequence/adpcm.c (working copy)
@@ -19,7 +19,7 @@
/* This code is "borrowed" from the ALSA library
http://www.alsa-project.org */
-short adpcm_decode_sample(char code) {
+static short adpcm_decode_sample(char code) {
short pred_diff; /* Predicted difference to next sample */
short step; /* holds previous step_size value */
char sign;
--- lib/ivis_opengl/piedraw.c (working copy)
+++ lib/ivis_opengl/piedraw.c (working copy)
@@ -69,7 +69,7 @@
PFNGLACTIVESTENCILFACEEXTPROC glActiveStencilFaceEXT;
-BOOL stencil_one_pass() {
+static BOOL stencil_one_pass(void) {
static BOOL initialised = FALSE;
static BOOL return_value;
@@ -694,7 +694,7 @@
dst[8] = invdet*(src[0]*src[5]-src[4]*src[1]);
}
-void pie_DrawShadows() {
+static void pie_DrawShadows(void) {
static BOOL dlist_defined = FALSE;
static GLuint dlist;
unsigned int i;
@@ -809,7 +809,7 @@
nb_scshapes = 0;
}
-void pie_DrawRemainingTransShapes() {
+static void pie_DrawRemainingTransShapes(void) {
unsigned int i;
for (i = 0; i < nb_tshapes; ++i) {
--- src/miscimd.c (revision 347)
+++ src/miscimd.c (working copy)
@@ -7,7 +7,7 @@
#include "miscimd.h"
/* Our great big array of imds */
-MISC_IMD miscImds[] =
+static MISC_IMD miscImds[] =
{ // Previous imd pointer names
{NULL,"fxsexp"}, // explosionSmallImd MI_EXPLOSION_SMALL
{NULL,"fxlexp"}, // explosionMediumImd MI_EXPLOSION_MEDIUM
--- src/effects.c (revision 347)
+++ src/effects.c (working copy)
@@ -57,7 +57,7 @@
extern UWORD OffScreenEffects;
/* Our list of all game world effects */
-EFFECT asEffectsList[MAX_EFFECTS];
+static EFFECT asEffectsList[MAX_EFFECTS];
#define FIREWORK_EXPLODE_HEIGHT 400
#define STARBURST_RADIUS 150
@@ -176,7 +176,7 @@
static FRACT fraction;
//
----------------------------------------------------------------------------------------
-BOOL essentialEffect(EFFECT_GROUP group, EFFECT_TYPE type)
+static BOOL essentialEffect(EFFECT_GROUP group, EFFECT_TYPE type)
{
switch(group)
{
@@ -201,7 +201,7 @@
break;
}
}
-BOOL utterlyReject(EFFECT_GROUP group, EFFECT_TYPE type)
+static BOOL utterlyReject(EFFECT_GROUP group, EFFECT_TYPE type)
{
switch(group)
{
@@ -1788,7 +1788,7 @@
}
//
----------------------------------------------------------------------------------------
-BOOL rejectLandLight(LAND_LIGHT_SPEC type)
+static BOOL rejectLandLight(LAND_LIGHT_SPEC type)
{
UDWORD timeSlice;
--- lib/netplay/netplay.c (revision 347)
+++ lib/netplay/netplay.c (working copy)
@@ -38,7 +38,7 @@
static BOOL allow_joining = FALSE;
-void NETallowJoining();
+static void NETallowJoining(void);
BOOL MultiPlayerJoin(DPID dpid);
BOOL MultiPlayerLeave(DPID dpid);
@@ -69,7 +69,7 @@
unsigned int bytes;
} NETBUFSOCKET;
-NETBUFSOCKET* NET_createBufferedSocket() {
+static NETBUFSOCKET* NET_createBufferedSocket(void) {
NETBUFSOCKET* bs = (NETBUFSOCKET*)malloc(sizeof(NETBUFSOCKET));
bs->socket = NULL;
@@ -221,7 +221,7 @@
static NET_PLAYER players[MAX_CONNECTED_PLAYERS];
-void NET_InitPlayers() {
+static void NET_InitPlayers(void) {
unsigned int i;
for (i = 0; i < MAX_CONNECTED_PLAYERS; ++i) {
@@ -1134,7 +1134,7 @@
// ////////////////////////////////////////////////////////////////////////
// Host a game with a given name and player name. & 4 user game flags
-void NETallowJoining() {
+static void NETallowJoining(void) {
unsigned int i;
UDWORD numgames=1; // always 1 on normal server
char buffer[5];
_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev