下記の添付コードで、
desc.bDeviceClass, desc.idVendor, desc.idProductの型はそれぞれ、
uint8_t,uint16_t, uint16_tですが、下記のprintf文で、次の警告が出ます。
Q1)この警告をなくする方法は、ありますか?
//添付コード
printf("DeviceClass=%04x idVendor=%04x idProduct=%04x:%04x\n",
(unsigned int)desc.bDeviceClass, (unsigned int)desc.idVendor, (unsigned int)desc.idProduct);
//警告: format '%x' expects a matching 'unsigned int' argument [-Wformat=]
以上、宜しくお願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。