<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Make failed when uncommented COMPRESS_STAT in red_worker.c"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=79246">79246</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>spice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Make failed when uncommented COMPRESS_STAT in red_worker.c
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>wangqiang.hunan@gmail.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>server
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Spice
          </td>
        </tr></table>
      <p>
        <div>
        <pre>As a developer, I maybe want to see the detail compress stat of spice, like
this:
Method         count      orig_size(MB)    enc_size(MB)    enc_time(s)
QUIC              846           948.02          147.22            7.51
GLZ              2895           594.90           26.60            1.33
ZLIB GLZ            0             0.00            0.00            0.00
LZ                  1             3.15            0.01            0.00
JPEG                0             0.00            0.00            0.00
JPEG-RGBA           0             0.00            0.00            0.00
----------------------------------------------------------------------------
Total            3742          1546.07          173.83            8.84

But when I uncommented the COMPRESS_STAT and COMPRESS_DEBUG in red_worker.c, I
got this error.

~/git/spice.last/server$ make
make  all-recursive
make[1]: Entering directory `/home/qiang/git/spice.last/server'
Making all in .
make[2]: Entering directory `/home/qiang/git/spice.last/server'
  CC       red_worker.lo
red_worker.c:260:1: error: 'inline' is not at beginning of declaration
[-Werror=old-style-declaration]
 double inline stat_byte_to_mega(uint64_t size)
 ^
In file included from ../spice-common/common/rect.h:24:0,
                 from red_worker.c:55:
red_worker.c: In function 'print_compress_stats':
red_worker.c:1155:79: error: 'CommonChannel' has no member named 'id'
     spice_info("==> Compression stats for display %u",
display_channel->common.id);
                                                                              
^
../spice-common/common/log.h:90:94: note: in definition of macro 'spice_info'
     spice_log(SPICE_LOG_DOMAIN, SPICE_LOG_LEVEL_INFO, SPICE_STRLOC,
__FUNCTION__, format, ## __VA_ARGS__); \
                                                                               
              ^
cc1: all warnings being treated as errors
make[2]: *** [red_worker.lo] Error 1
make[2]: Leaving directory `/home/qiang/git/spice.last/server'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/qiang/git/spice.last/server'
make: *** [all] Error 2</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>