mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-11 10:20:00 +01:00
fix warnings, dont redeclare bool in bio2jack
This commit is contained in:
@@ -423,7 +423,6 @@ static int
|
|||||||
JACK_callback(nframes_t nframes, void *arg)
|
JACK_callback(nframes_t nframes, void *arg)
|
||||||
{
|
{
|
||||||
jack_driver_t *drv = (jack_driver_t *) arg;
|
jack_driver_t *drv = (jack_driver_t *) arg;
|
||||||
struct timespec tmp_tp;
|
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
// clock_gettime(CLOCK_MONOTONIC, &tmp_tp );
|
// clock_gettime(CLOCK_MONOTONIC, &tmp_tp );
|
||||||
|
|||||||
@@ -25,7 +25,9 @@
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#else
|
#else
|
||||||
#define bool long
|
#ifndef bool
|
||||||
|
#define bool int
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TRUE
|
#ifndef TRUE
|
||||||
|
|||||||
@@ -1340,20 +1340,28 @@ static int veejay_create_homedir(char *path)
|
|||||||
free(font_dir);
|
free(font_dir);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define PATH_TMP_SIZE 1024
|
||||||
|
#define PATH_SUFFIX_SIZE 64
|
||||||
void veejay_check_homedir(void *arg)
|
void veejay_check_homedir(void *arg)
|
||||||
{
|
{
|
||||||
veejay_t *info = (veejay_t *) arg;
|
veejay_t *info = (veejay_t *) arg;
|
||||||
char path[1024];
|
char path[ PATH_TMP_SIZE - PATH_SUFFIX_SIZE ];
|
||||||
char tmp[1024];
|
char tmp[ PATH_TMP_SIZE ];
|
||||||
char *home = getenv("HOME");
|
char *home = getenv("HOME");
|
||||||
if(!home)
|
if(!home)
|
||||||
{
|
{
|
||||||
veejay_msg(VEEJAY_MSG_ERROR,
|
veejay_msg(VEEJAY_MSG_ERROR, "HOME environment variable not set");
|
||||||
"HOME environment variable not set");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
snprintf(path,sizeof(path), "%s/.veejay", home );
|
|
||||||
info->homedir = vj_strndup( path, 1024 );
|
int n = snprintf(path,sizeof(path), "%s/.veejay", home );
|
||||||
|
if( n < 0 || n >= (int) sizeof(path)) {
|
||||||
|
veejay_msg(VEEJAY_MSG_ERROR, "HOME path too long: %s", home );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
info->homedir = vj_strndup( path, sizeof(path) );
|
||||||
|
|
||||||
if( veejay_valid_homedir(path) == 0)
|
if( veejay_valid_homedir(path) == 0)
|
||||||
{
|
{
|
||||||
@@ -1365,13 +1373,24 @@ void veejay_check_homedir(void *arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(tmp,sizeof(tmp), "%s/plugins.cfg", path );
|
n = snprintf(tmp,sizeof(tmp), "%s/plugins.cfg", path );
|
||||||
|
if(n < 0 || n >= (int) sizeof(tmp)) {
|
||||||
|
veejay_msg(VEEJAY_MSG_ERROR, "Path too long for plugins.cfg: %s", path );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
struct statfs ts;
|
struct statfs ts;
|
||||||
if( statfs( tmp, &ts ) != 0 )
|
if( statfs( tmp, &ts ) != 0 )
|
||||||
{
|
{
|
||||||
veejay_msg(VEEJAY_MSG_WARNING,"No plugin configuration file found in [%s] (see DOC/HowtoPlugins)",tmp);
|
veejay_msg(VEEJAY_MSG_WARNING,"No plugin configuration file found in [%s] (see DOC/HowtoPlugins)",tmp);
|
||||||
}
|
}
|
||||||
snprintf(tmp,sizeof(tmp), "%s/viewport.cfg", path);
|
|
||||||
|
n = snprintf(tmp,sizeof(tmp), "%s/viewport.cfg", path);
|
||||||
|
if( n < 0 || n >= (int) sizeof(tmp)) {
|
||||||
|
veejay_msg(VEEJAY_MSG_ERROR, "Path too long for viewport.cfg: %s",path);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( statfs( tmp, &ts ) != 0 )
|
if( statfs( tmp, &ts ) != 0 )
|
||||||
{
|
{
|
||||||
veejay_msg(VEEJAY_MSG_WARNING,"No projection mapping file found in [%s]", tmp);
|
veejay_msg(VEEJAY_MSG_WARNING,"No projection mapping file found in [%s]", tmp);
|
||||||
|
|||||||
Reference in New Issue
Block a user