]> granicus.if.org Git - php/commitdiff
More compile warnings nuked.
authorfoobar <sniper@php.net>
Wed, 22 Aug 2001 09:20:40 +0000 (09:20 +0000)
committerfoobar <sniper@php.net>
Wed, 22 Aug 2001 09:20:40 +0000 (09:20 +0000)
ext/ctype/ctype.c
ext/ming/ming.c

index d5561601782cd95007d2cbb0db1a027aa189cac2..8e5326759e4b753c453819246be7c4e6970148fc 100644 (file)
@@ -38,7 +38,7 @@ ZEND_DECLARE_MODULE_GLOBALS(ctype)
 */
 
 /* True global resources - no need for thread safety here */
-static int le_ctype;
+/* static int le_ctype; */
 
 /* {{{ ctype_functions[]
  * Every user visible function must have an entry in ctype_functions[].
index 67f35bec7e80ebd52bf8ebaced655ab41db3195b..5494124f8c0199526178f698b243cded7a575b0b 100644 (file)
 #endif
 
 #include "php.h"
-
-#if HAVE_MING
+#include "php_ming.h"
 #include "ext/standard/info.h"
 #include "ext/standard/file.h"
-#include "php_ming.h"
+#include "ext/standard/fsock.h"
+
+#if HAVE_MING
 
 static zend_function_entry ming_functions[] = {
   PHP_FALIAS(ming_setcubicthreshold,  ming_setCubicThreshold,  NULL)
@@ -180,6 +181,7 @@ SWFCharacter getCharacter(zval *id TSRMLS_DC)
     return (SWFCharacter)getBitmap(id TSRMLS_CC);
   else
     php_error(E_ERROR, "called object is not an SWFCharacter");
+       return NULL;
 }
 
 /* }}} */
@@ -210,7 +212,7 @@ static SWFInput newSWFInput_sock(int socket)
       buffer = realloc(buffer, alloced);
     }
 
-    l = php_sock_fread(buffer+offset, SOCKBUF_INCREMENT, socket);
+    l = SOCK_FREAD(buffer+offset, SOCKBUF_INCREMENT, socket);
 
     offset += l;
   }
@@ -222,8 +224,7 @@ static SWFInput newSWFInput_sock(int socket)
 static SWFInput getInput(zval **zfile)
 {
   FILE *file;
-  int type, s, offset;
-  char *buffer;
+  int type;
   SWFInput input;
 
   file = (FILE *)zend_fetch_resource(zfile, -1, "File-Handle", &type, 3,
@@ -312,7 +313,7 @@ PHP_FUNCTION(swfbitmap_init)
   zval **zfile, **zmask = NULL;
   SWFBitmap bitmap;
   SWFInput input, maskinput;
-  int ret, type;
+  int ret;
 
   if(ZEND_NUM_ARGS() == 1)
   {
@@ -1312,7 +1313,7 @@ static SWFGradient getGradient(zval *id TSRMLS_DC)
 
 PHP_FUNCTION(swfgradient_addEntry)
 {
-  zval **ratio, **r, **g, **b, **za;
+  zval **ratio, **r, **g, **b;
   byte a = 0xff;
 
   if(ZEND_NUM_ARGS() == 4)
@@ -1590,8 +1591,6 @@ PHP_FUNCTION(swfmovie_saveToFile)
 {
   zval **x;
   SWFMovie movie = getMovie(getThis() TSRMLS_CC);
-  int type;
-  int le_fopen;
   void *what;
 
   if((ZEND_NUM_ARGS() != 1) || zend_get_parameters_ex(1, &x) == FAILURE)
@@ -1710,7 +1709,6 @@ PHP_FUNCTION(swfmovie_setFrames)
 
 PHP_FUNCTION(swfmovie_streamMp3)
 {
-  FILE *file;
   zval **zfile;
   SWFSound sound;
   SWFInput input;
@@ -3053,8 +3051,12 @@ PHP_RINIT_FUNCTION(ming)
 {
   /* XXX - this didn't work so well last I tried.. */
 
-  if(Ming_init() != 0)
+  if(Ming_init() != 0) {
     php_error(E_ERROR, "Error initializing Ming module");
+    return FAILURE;
+  }
+
+  return SUCCESS;
 }
 
 PHP_MINIT_FUNCTION(ming)