[Mesa-dev] [Bug 110847] occlusion-query.c:190:45: error: format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long long') [-Werror, -Wformat]

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jun 6 02:20:36 UTC 2019


https://bugs.freedesktop.org/show_bug.cgi?id=110847

            Bug ID: 110847
           Summary: occlusion-query.c:190:45: error: format specifies type
                    'unsigned long' but the argument has type 'uint64_t'
                    (aka 'unsigned long long') [-Werror,-Wformat]
           Product: Mesa
           Version: unspecified
          Hardware: x86-64 (AMD64)
                OS: All
            Status: NEW
          Keywords: bisected, regression
          Severity: normal
          Priority: medium
         Component: Other
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: vlee at freedesktop.org
        QA Contact: mesa-dev at lists.freedesktop.org
                CC: mark.a.janes at intel.com

../src/gallium/tests/graw/occlusion-query.c:190:45: error: format specifies
type 'unsigned long' but the argument has type 'uint64_t' (aka 'unsigned long
long') [-Werror,-Wformat]
   printf("result1 = %lu  result2 = %lu\n", res1.u64, res2.u64);
                     ~~~                    ^~~~~~~~
                     %llu


commit c9c1e26106478258d8a91fe8fc5c69d8c3fa5206
Author: Mark Janes <mark.a.janes at intel.com>
Date:   Mon Jun 3 16:59:45 2019 -0700

    mesa: prevent common string formatting security issues

    Adds a compile-time error for obvious security issues like:

      printf(string_var);

    The proposed flag is more tolerant than -Wformat-nonliteral.
    Specifically, it tolerates common mesa formatting like:

      static const char *shader_template = "really long string %d";
      printf(shader_template, uniform_number);

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110833
    Reviewed-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Eric Engestrom <eric at engestrom.ch>

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190606/a5b93c28/attachment.html>


More information about the mesa-dev mailing list