diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2009-09-06 17:20:05 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2009-09-06 17:20:05 +0400 |
commit | fb649d5824ccccca544c905209ba64340dc1bded (patch) | |
tree | ac9894e159f91ffe65c41612779711fbc3525cac /source/blender/blenkernel/intern | |
parent | 51aa207d200d2cef1cdc7f4e90a6a0f7a4b31c8e (diff) |
* cleaning up warnings (mostly windows). A collection of other warning fixes too (undefined function, assuming int, etc.)
This compiled fine with scons/msvc and scons/mingw (gcc 4.4.0). Please test and report any problems.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/packedFile.c | 8 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 16 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 2 |
4 files changed, 17 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index eb8872c43a5..cdb175ed661 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -38,6 +38,11 @@ #include <time.h> +#ifdef _WIN32 +#define open _open +#define close _close +#endif + #include "MEM_guardedalloc.h" #include "IMB_imbuf_types.h" diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c index 3e47c1006e5..bd0b1a5e36e 100644 --- a/source/blender/blenkernel/intern/packedFile.c +++ b/source/blender/blenkernel/intern/packedFile.c @@ -63,6 +63,14 @@ #include "BKE_packedFile.h" #include "BKE_report.h" +#ifdef _WIN32 +#define open _open +#define close _close +#define read _read +#define write _write +#endif + + int seekPackedFile(PackedFile *pf, int offset, int whence) { int oldseek = -1, seek = 0; diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 3e429749953..912acc4786f 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -67,23 +67,13 @@ /* needed for directory lookup */ +/* untitled blend's need getpid for a unique name */ #ifndef WIN32 #include <dirent.h> +#include <unistd.h> #else - #include "BLI_winstuff.h" -#endif - -/* untitled blend's need getpid for a unique name */ -#ifdef WIN32 #include <process.h> -#else -#include <unistd.h> -#endif - -#ifdef _WIN32 -#ifndef snprintf -#define snprintf _snprintf -#endif + #include "BLI_winstuff.h" #endif static void ptcache_data_to(void **data, int type, int index, void *to); diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 06ef8a23142..2d5d8dad7a8 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -250,12 +250,12 @@ void sound_free(struct bSound* sound) void sound_unlink(struct bContext *C, struct bSound* sound) { - bSound *snd; Scene *scene; SoundHandle *handle; // XXX unused currently #if 0 + bSound *snd; for(snd = CTX_data_main(C)->sound.first; snd; snd = snd->id.next) { if(snd->child_sound == sound) |