Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Ops, missed some signess fixups
[simgrid.git] / src / xbt / xbt_str.c
index 2ca23ab..f62ef1b 100644 (file)
@@ -370,7 +370,7 @@ XBT_TEST_UNIT("xbt_str_split_quoted",test_split_quoted, "test the function xbt_s
 
 char *xbt_str_join(xbt_dynar_t dyn, const char*sep) {
   int len=1,dyn_len=xbt_dynar_length(dyn);
-  int cpt;
+  unsigned int cpt;
   char *cursor;
   char *res,*p;
   
@@ -395,6 +395,9 @@ char *xbt_str_join(xbt_dynar_t dyn, const char*sep) {
 }
    
 #if !defined(HAVE_GETLINE) || defined(DOXYGEN)
+/* prototype here, just in case */
+long getline(char **buf, size_t *n, FILE *stream);
+
 /** @brief Get a single line from the stream (reimplementation of the GNU getline)
  * 
  * This is a redefinition of the GNU getline function, used on platforms where it does not exists.
@@ -412,7 +415,8 @@ char *xbt_str_join(xbt_dynar_t dyn, const char*sep) {
  */
 long getline(char **buf, size_t *n, FILE *stream) {
    
-   int i, ch;
+   size_t i;
+   int ch;
    
    if (!*buf) {
      *buf = xbt_malloc(512);
@@ -452,7 +456,7 @@ long getline(char **buf, size_t *n, FILE *stream) {
 static xbt_matrix_t diff_build_LCS(xbt_dynar_t da, xbt_dynar_t db) {
   xbt_matrix_t C = xbt_matrix_new(xbt_dynar_length(da),xbt_dynar_length(db),
                                  sizeof(int),NULL); 
-  int i,j;
+  unsigned long i,j;
 
   /* Compute the LCS */
   /*