1. 31 Jan, 2012 11 commits
    • Kir Kolyshkin's avatar
      files.c: fix printf format warnings · cced37da
      Kir Kolyshkin authored
      files.c: In function ‘collect_fd’:
      files.c:111:2: error: format ‘%d’ expects type ‘int’, but argument 3 has type ‘u64’
      files.c: In function ‘open_fd’:
      files.c:348:3: error: format ‘%d’ expects type ‘int’, but argument 2 has type ‘u64’
      files.c: In function ‘receive_fd’:
      files.c:425:5: error: format ‘%d’ expects type ‘int’, but argument 4 has type ‘u64’
      files.c:425:5: error: format ‘%d’ expects type ‘int’, but argument 5 has type ‘u64’
      Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      cced37da
    • Kir Kolyshkin's avatar
      sockets.c: fix printf format warnings · 6c9d6a86
      Kir Kolyshkin authored
      sockets.c: In function ‘try_dump_socket’:
      sockets.c:366:3: error: format ‘%d’ expects type ‘int’, but argument 4 has type ‘__ino_t’
      Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      6c9d6a86
    • Kir Kolyshkin's avatar
      cr-show.c: fix printf format warnings · e70f8d23
      Kir Kolyshkin authored
      cr-show.c: In function ‘show_pipes’:
      cr-show.c:119:3: error: format ‘%8lx’ expects type ‘long unsigned int’, but argument 2 has type ‘u32’
      cr-show.c:119:3: error: format ‘%8lx’ expects type ‘long unsigned int’, but argument 3 has type ‘u32’
      cr-show.c:119:3: error: format ‘%8lx’ expects type ‘long unsigned int’, but argument 4 has type ‘u32’
      cr-show.c:119:3: error: format ‘%8lx’ expects type ‘long unsigned int’, but argument 5 has type ‘u32’
      Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      e70f8d23
    • Kir Kolyshkin's avatar
      cr-dump.c: fix printf format warnings · a207bee1
      Kir Kolyshkin authored
      cr-dump.c: In function ‘dump_one_reg_file’:
      cr-dump.c:128:2: error: format ‘%8x’ expects type ‘unsigned int’, but argument 5 has type ‘long unsigned int’
      cr-dump.c: In function ‘dump_one_pipe’:
      cr-dump.c:223:2: error: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long unsigned int’
      cr-dump.c:237:3: error: format ‘%8lx’ expects type ‘long unsigned int’, but argument 2 has type ‘u32’
      cr-dump.c:237:3: error: format ‘%8lx’ expects type ‘long unsigned int’, but argument 3 has type ‘u32’
      cr-dump.c:237:3: error: format ‘%8lx’ expects type ‘long unsigned int’, but argument 4 has type ‘u32’
      cr-dump.c:237:3: error: format ‘%8lx’ expects type ‘long unsigned int’, but argument 5 has type ‘u32’
      cr-dump.c:240:3: error: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’
      cr-dump.c: In function ‘dump_one_fd’:
      cr-dump.c:257:3: error: format ‘%d’ expects type ‘int’, but argument 5 has type ‘long unsigned int’
      cr-dump.c:262:3: error: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’
      cr-dump.c:272:4: error: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long unsigned int’
      cr-dump.c:286:4: error: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’
      cr-dump.c:295:2: error: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’
      cr-dump.c: In function ‘dump_task_files’:
      cr-dump.c:340:3: error: too few arguments for format
      Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      a207bee1
    • Kir Kolyshkin's avatar
      proc_parse.c: fix printf format warnings · b44cd588
      Kir Kolyshkin authored
      proc_parse.c: In function ‘parse_maps’:
      proc_parse.c:75:6: error: format ‘%Lu’ expects type ‘long long unsigned int’, but argument 5 has type ‘u64’
      proc_parse.c:118:5: error: format ‘%Lu’ expects type ‘long long unsigned int’, but argument 5 has type ‘u64’
      Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      b44cd588
    • Kir Kolyshkin's avatar
      cr-restore.c: fix printf format warnings · 9e082442
      Kir Kolyshkin authored
      cr-restore.c: In function ‘fixup_vma_fds’:
      cr-restore.c:578:4: error: format ‘%d’ expects type ‘int’, but argument 6 has type ‘long unsigned int’
      cr-restore.c: In function ‘sigreturn_restore’:
      cr-restore.c:1693:4: error: format ‘%li’ expects type ‘long int’, but argument 4 has type ‘int’
      cr-restore.c:1738:3: error: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long int’
      cr-restore.c:1751:3: error: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long int’
      cr-restore.c:1755:3: error: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long int’
      cr-restore.c:1868:4: error: format ‘%8p’ expects type ‘void *’, but argument 3 has type ‘long int’
      Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      9e082442
    • Kir Kolyshkin's avatar
      Annotate printk with printf attribute · fa5ce311
      Kir Kolyshkin authored
      This way gcc will be able to catch invalid format bugs.
      Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      fa5ce311
    • Kir Kolyshkin's avatar
      Make BUG_ON() clang-compatible · 6ce8d8ab
      Kir Kolyshkin authored
      When trying to compile the beast with clang, it complains:
      
      ====
      ./include/lock.h:33:2: error: indirection of non-volatile null pointer will be deleted, not trap
              BUG_ON(ret < 0);
              ^~~~~~~~~~~~~~~
      In file included from restorer.c:18:
      ./include/util.h:118:27: note: instantiated from:
      #define BUG_ON(condition)       BUG_ON_HANDLER((condition))
                                      ^
      ./include/util.h:100:4: note: instantiated from:
                              *(unsigned long *)NULL = 0xdead0000 + __LINE__; \
                              ^
      ====
      
      Make clang happy again by adding 'volatile'.
      Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      6ce8d8ab
    • Kir Kolyshkin's avatar
      pr_perror(): print error at the end of line · 0b237ae9
      Kir Kolyshkin authored
      This is a standard convention to print error message (i.e. strerror(errno))
      at the end of line, like this:
      
              Cannot remove file: Permission denied
      
      So pr_perror is fixed to follow this convention (using GNU extension
      %m helps a lot here). Unfortunately, due to this we have to make
      pr_perror() print a new line character, too, so we had to strip it
      from the all pr_perror() invocations.
      
      That (appending a newline) also makes pr_perror() a black sheep
      in the herd of pr_* helpers, but what can we do? Worst case scenario
      is an extra newline after an error message, not too harmful.
      
      An alternative approach (stripping the newline from the passed format
      string and re-adding it) was discussed thoroughly, and it was decided
      that such a hack looks a bit too dirty.
      Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
      Acked-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      0b237ae9
    • Stanislav Kinsbursky's avatar
      namespaces: split UTS and generic code · 225d119e
      Stanislav Kinsbursky authored
      Generic code will be used for other namespaces.
      Signed-off-by: 's avatarStanislav Kinsbursky <skinsbursky@parallels.com>
      Acked-by: 's avatarPavel Emelyanov <xemul@parallels.com>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      225d119e
    • Kir Kolyshkin's avatar
      restore_pipe_data(): fix a typo · 8a6269e4
      Kir Kolyshkin authored
      Found using clang:
      
      cr-restore.c:796:8: error: use of unary operator that may be intended as compound assignment (+=)
                      size =+ ret;
                           ^~
      Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
      Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
      8a6269e4
  2. 30 Jan, 2012 17 commits
  3. 29 Jan, 2012 1 commit
  4. 28 Jan, 2012 3 commits
  5. 27 Jan, 2012 8 commits