1. 31 Aug, 2022 1 commit
  2. 13 Aug, 2022 3 commits
    • Alan Coopersmith's avatar
      Add cast to clear -Wsign-compare warning · c125d8ba
      Alan Coopersmith authored
      
      
      ico.c: In function ‘do_ico_window’:
      ico.c:1084:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          if (xev.xclient.data.l[0] == wm_delete_window)
                                    ^~
      
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      c125d8ba
    • Alan Coopersmith's avatar
      Rename global "poly" to fix gcc -Wshadow warnings · fc54ce8a
      Alan Coopersmith authored
      
      
      ico.c: In function ‘initPoly’:
      ico.c:472:45: warning: declaration of ‘poly’ shadows a global declaration [-Wshadow]
       initPoly(struct closure *closure, Polyinfo *poly, int icoW, int icoH)
                                                   ^~~~
      ico.c:238:18: note: shadowed declaration is here
       static Polyinfo *poly;  /* -obj: the poly to draw */
                        ^~~~
      ico.c: In function ‘drawPoly’:
      ico.c:567:45: warning: declaration of ‘poly’ shadows a global declaration [-Wshadow]
       drawPoly(struct closure *closure, Polyinfo *poly, GC gc,
                                                   ^~~~
      ico.c:238:18: note: shadowed declaration is here
       static Polyinfo *poly;  /* -obj: the poly to draw */
                        ^~~~
      ico.c: In function ‘giveObjHelp’:
      ico.c:1137:13: warning: declaration of ‘poly’ shadows a global declaration [-Wshadow]
         Polyinfo *poly = polygons+i;
                   ^~~~
      ico.c:238:18: note: shadowed declaration is here
       static Polyinfo *poly;  /* -obj: the poly to draw */
                        ^~~~
      ico.c: In function ‘findpoly’:
      ico.c:1152:13: warning: declaration of ‘poly’ shadows a global declaration [-Wshadow]
         Polyinfo *poly = polygons+i;
                   ^~~~
      ico.c:238:18: note: shadowed declaration is here
       static Polyinfo *poly;  /* -obj: the poly to draw */
                        ^~~~
      
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      fc54ce8a
    • Alan Coopersmith's avatar
      Apply scope reduction suggestions from cppcheck · 9e5fe5ae
      Alan Coopersmith authored
      
      
      [ico.c:587]: (style) The scope of the variable 'pxvz' can be reduced.
      [ico.c:730]: (style) The scope of the variable 't' can be reduced.
      [ico.c:1132]: (style) The scope of the variable 'poly' can be reduced.
      [ico.c:1149]: (style) The scope of the variable 'poly' can be reduced.
      
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      9e5fe5ae
  3. 02 Apr, 2022 1 commit
  4. 03 Dec, 2021 2 commits
  5. 22 Nov, 2018 1 commit
  6. 17 Nov, 2018 1 commit
  7. 10 Mar, 2018 1 commit
  8. 07 Mar, 2018 1 commit
  9. 26 Jan, 2017 3 commits
  10. 24 Apr, 2015 1 commit
  11. 19 Jan, 2015 1 commit
  12. 25 Oct, 2014 1 commit
  13. 02 Jun, 2014 6 commits
  14. 16 Jan, 2013 1 commit
  15. 04 Jan, 2013 2 commits
    • Alan Coopersmith's avatar
      Fix some 64-bit vs. 32-bit conversion errors · d065113b
      Alan Coopersmith authored
      
      
      ico.c:851:7: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
              fg = WhitePixel(dpy, DefaultScreen(dpy));
                 ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      ico.c:852:7: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
              bg = BlackPixel(dpy, DefaultScreen(dpy));
                 ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      ico.c:858:18: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
                    bg = cdef.pixel;
                       ~ ~~~~~^~~~~
      
      ico.c:866:18: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
                    fg = cdef.pixel;
                       ~ ~~~~~^~~~~
      
      ico.c:874:11: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
                  bg = tmp;
      
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      d065113b
    • Alan Coopersmith's avatar
      Mark a couple parameters as unused to silence compiler warnings · 99ca5c8d
      Alan Coopersmith authored
      
      
      ico.c:436:20: warning: unused parameter 'display' [-Wunused-parameter]
      predicate(Display *display, XEvent *event, XPointer args)
      
      ico.c:511:51: warning: unused parameter 'firsttime' [-Wunused-parameter]
      setDisplayBuf(struct closure *closure, int n, int firsttime)
      
      Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
      99ca5c8d
  16. 06 Jun, 2012 1 commit
  17. 09 Jun, 2011 1 commit
  18. 19 Jan, 2011 1 commit
  19. 12 Jan, 2011 1 commit
  20. 30 Oct, 2010 5 commits
  21. 11 Feb, 2010 1 commit
  22. 26 Nov, 2009 1 commit
  23. 28 Oct, 2009 1 commit
  24. 27 Oct, 2009 2 commits