From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0719.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe49::719]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A49811A1DF1 for ; Tue, 27 Sep 2016 12:28:36 -0700 (PDT) Received: from AT5PR84MB0291.NAMPRD84.PROD.OUTLOOK.COM (10.162.138.25) by AT5PR84MB0289.NAMPRD84.PROD.OUTLOOK.COM (10.162.138.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.639.5; Tue, 27 Sep 2016 19:28:34 +0000 Received: from AT5PR84MB0291.NAMPRD84.PROD.OUTLOOK.COM ([10.162.138.25]) by AT5PR84MB0291.NAMPRD84.PROD.OUTLOOK.COM ([10.162.138.25]) with mapi id 15.01.0639.011; Tue, 27 Sep 2016 19:28:34 +0000 From: "Cohen, Eugene" To: "Kinney, Michael D" , "afish@apple.com" CC: Laszlo Ersek , Alexei Fedorov , "edk2-devel@lists.01.org" Thread-Topic: [edk2] What is the right way to print a UINTN? Thread-Index: AdIX/FZUkJ+/GDfSRZe7u7ShyrQtxgADrrkAACt3LCAABK1IAAADDJDAAAG9ggAAAWV6gAAD9rWw Date: Tue, 27 Sep 2016 19:28:34 +0000 Message-ID: References: <0de4dd03-faa7-1608-9625-369ab5d6e682@redhat.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=eugene@hp.com; x-originating-ip: [15.65.252.13] x-ms-office365-filtering-correlation-id: 97fb6042-14ad-4da1-f55f-08d3e70c790b x-microsoft-exchange-diagnostics: 1; AT5PR84MB0289; 6:HCpOhqIfxBfw8WGM6W9geecjkhSABmnOovWCPrMslTlcs32HM60j2V3jDLcr2hb2TTJHpr48xAHM/BIhlGcNEwAoIziWKmtg47eyw2yV0NHAP9O0vgHSRRq/hjwSl2WSYFdHU3neHHhuccpFT17Cr2Up9Px00qkb5Lv00XPIUEPUAiI/M1FSE0ngS7HIfdQFKNF6x1Jy32vVeFbTF59cgNdmJfKzAPhmtauOwZ7vXmyvx6VIAr43g3SuUKDToPlGfewDAeC8BYgqpJaaY30HQe5EM65Zf9u/jH35DV0eZ7g=; 5:fNU3M6j6srfpa1wSrJ5rDNleZGolq4jqeS3vwQAjtegq62Qws/Pq6b0QL/LlsKzYaXmqAoisw8jr3IdtICQ6YU7nwXscqvfOz2H/GRPnvuJmfx3FcU+iqGDwldwtmwro91wErpF/wxcT1z9pIu35uQ==; 24:6UR7WLmBSJydRi543DcgDNmy5meQsIhVSZE/Y3mok10CFRYIQBWrtSNe98SEftx8rdsN8DEA8/qWadF8mQN+3PPldwh3MpBuAPZJhIQab64=; 7:HXGVxi8pfyZAq8uf4E/V40KE6/kzYsDmwyASvQ8jbY4GzdGVdDh6+AtnCXs3+7Z5i27Gb0rLY0SH2o7ogQ9aFbDr7KoHzrTuapfCXE470xfgFFpZgGOtlcyBiaY64pT66U7YrME+sAm2kz3lFExD8cL+J773S2PkLTac0Yl913OJao1KaZX18bLT9iL8Gx7XJS9v7xCXJ/idUy5nly5QX3b3US51qnG9dFh/b2/Isu+gqO+U1FousvjMSr8DcnHWMRQ9SAACCC5s+SUeGymeu5zPAHyNxtxRAZHFAwkDHXu1p86ZX6jWkqK0oImnNJXI x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AT5PR84MB0289; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:AT5PR84MB0289; BCL:0; PCL:0; RULEID:; SRVR:AT5PR84MB0289; x-forefront-prvs: 007814487B x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(6602003)(199003)(189002)(5001770100001)(189998001)(76176999)(9686002)(8666005)(54356999)(5660300001)(101416001)(2906002)(122556002)(4326007)(92566002)(10400500002)(68736007)(7696004)(50986999)(2900100001)(8936002)(8676002)(81156014)(86362001)(3280700002)(66066001)(81166006)(97736004)(102836003)(77096005)(2950100002)(6116002)(33656002)(7736002)(105586002)(87936001)(7846002)(11100500001)(305945005)(106356001)(2501003)(74316002)(3660700001)(3846002)(93886004)(99286002)(5002640100001)(586003)(7059030)(43043002); DIR:OUT; SFP:1102; SCL:1; SRVR:AT5PR84MB0289; H:AT5PR84MB0291.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: hp.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Sep 2016 19:28:34.4421 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: ca7981a2-785a-463d-b82a-3db87dfc3ce6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR84MB0289 Subject: Re: What is the right way to print a UINTN? X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 19:28:37 -0000 Content-Language: en-US Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIke, > Portable sources that use type UINTN must never use values larger > than > 32-bits. Same for type INTN. Only use values in signed 32-bit range. If the value is something like an enumeration or bitmask then I agree, but = not if it's something numeric that is supposed to scale to larger numbers o= n 64-bit platforms like the Length field of CopyMem. I like the proposals to use a custom format specifier (although the concate= nated string with macro will take some getting used to). Thanks, Eugene