如何在Xcode中禁用以下警告?
对于'uchar'类型的字段(又名'unsigned char'),'packed'属性被忽略
我浏览了警告开关列表但找不到任何关于此的信息,也没有成功地禁用了迂腐警告。
答案 0 :(得分:1)
使用#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wignored-attributes"
your code
#pragma clang diagnostic pop
$servername = "127.0.0.1:3306";
$username = "username";
$password = "password";
$dbname = "db_Name";
$conn = mysql_connect('$servername', '$username', '$password', '$dbname');
if (!$conn) {
die ("Connection failed: " . mysql_errror);
}
$query = mysql_query($conn, "select Songtitel, Interpret, Upvote, Downvote, Link from tMusic");
while ($temp = mysql_fetch_array($query)) {
echo "<a href=""<div class="songdiv">";
echo "<div class="songimgdiv"><img class="songimg" src="../images/musiclogo.png" alt=""></div>";
echo "<div class="songinfodiv">";
echo "<div class="songtitleinfodiv"><p class="songtitleinfo">'.$temp['Songtitel'].'</p><p class="songinterpretinfo">'.$temp['Interpret'].'</p></div>";
echo "<div class="songratingdiv"><img class="thumbupimg" src="../images/thumbup.png" alt=""><p class="thumbupnumber">'.$temp['Upvote'].'</p><img class="thumdownimg" src="../images/thumbdown.png" alt=""><p class="thumbdownnumber">'.$temp['Downvote'].'</p></div>";
echo "</div>";
echo "</div>";
}
mysql_close($conn);
?>
上找到完整列表